erlang/otp-0010-configure.ac-C99-fix-for-ERTS___AFTER_MORECORE_HOOK_.patch
Peter Lemenkov 0f8f18f5b0 Erlang ver. 25.3.2.11
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2024-04-13 18:34:53 +02:00

36 lines
1010 B
Diff

From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 24 Nov 2022 11:57:49 +0100
Subject: [PATCH] configure.ac: C99 fix for
ERTS___AFTER_MORECORE_HOOK_CAN_TRACK_MALLOC
#include <unistd.h> for the sbrk function if the header is available.
diff --git a/erts/configure b/erts/configure
index 44bbe9ef68..8a7d47b1f9 100755
--- a/erts/configure
+++ b/erts/configure
@@ -20672,6 +20672,9 @@ else $as_nop
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#if defined(HAVE_END_SYMBOL)
extern char end;
#elif defined(HAVE__END_SYMBOL)
diff --git a/erts/configure.ac b/erts/configure.ac
index f6bcbd11ff..617deafc42 100644
--- a/erts/configure.ac
+++ b/erts/configure.ac
@@ -2445,6 +2445,9 @@ AC_CACHE_CHECK([if __after_morecore_hook can track malloc()s core memory use],
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#if defined(HAVE_END_SYMBOL)
extern char end;
#elif defined(HAVE__END_SYMBOL)