diff --git a/configure b/configure index 34e351883..fb0eeb4eb 100755 --- a/configure +++ b/configure @@ -18966,8 +18966,16 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5 -$as_echo_n "checking for sbrk... " >&6; } +for ac_func in sbrk +do : + ac_fn_c_check_func "$LINENO" "sbrk" "ac_cv_func_sbrk" +if test "x$ac_cv_func_sbrk" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SBRK 1 +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sbrk is not deprecated" >&5 +$as_echo_n "checking if sbrk is not deprecated... " >&6; } # catch the warning of deprecated sbrk old_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror" @@ -18993,6 +19001,10 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$old_cflags" +fi +done + + # check if setreuid en setregid fail, on MacOSX10.4(darwin8). if echo $build_os | grep darwin8 > /dev/null; then diff --git a/configure.ac b/configure.ac index ec2865b4c..3a8c55fd1 100644 --- a/configure.ac +++ b/configure.ac @@ -1147,7 +1147,8 @@ AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit se AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])]) AC_CHECK_FUNCS([setresgid],,[AC_CHECK_FUNCS([setregid])]) -AC_MSG_CHECKING([for sbrk]) +AC_CHECK_FUNCS([sbrk],[ +AC_MSG_CHECKING([if sbrk is not deprecated]) # catch the warning of deprecated sbrk old_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror" @@ -1159,6 +1160,7 @@ int main(void) { void* cur = sbrk(0); printf("%u\n", (unsigned)(size_t)((char*)c AC_DEFINE(HAVE_SBRK, 1, [define if you have the sbrk() call]) ], [AC_MSG_RESULT(no)]) CFLAGS="$old_cflags" +]) # check if setreuid en setregid fail, on MacOSX10.4(darwin8). if echo $build_os | grep darwin8 > /dev/null; then diff --git a/doc/Changelog b/doc/Changelog index b4653c4ea..00f6adae2 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +31 October 2016: Wouter + - Fix failure to build on arm64 with no sbrk. + 28 October 2016: Wouter - Patch for server.num.zero_ttl stats for count of expired replies, from Pavel Odintsov.