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