- Fix failure to build on arm64 with no sbrk.

git-svn-id: file:///svn/unbound/trunk@3911 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2016-10-31 08:05:41 +00:00
parent 96961081b0
commit 705e3e8d1c
3 changed files with 20 additions and 3 deletions

16
configure vendored
View file

@ -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

View file

@ -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

View file

@ -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.