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