summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2013-12-04 05:49:36 (GMT)
committerJason Evans <jasone@canonware.com>2013-12-04 05:49:36 (GMT)
commit66688535969c6dcb234448e590f27df38b4eebdf (patch)
treee5bddd438c82bbe65b069c0ffc67b9b07ea6acf1 /configure.ac
parent52b30691f9a98fe7c8c59d587eb6285a3bacaabc (diff)
downloadjemalloc-66688535969c6dcb234448e590f27df38b4eebdf.zip
jemalloc-66688535969c6dcb234448e590f27df38b4eebdf.tar.gz
jemalloc-66688535969c6dcb234448e590f27df38b4eebdf.tar.bz2
Avoid deprecated sbrk(2) on OS X.
Avoid referencing sbrk(2) on OS X, because it is deprecated as of OS X 10.9 (Mavericks), and the compiler warns against using it.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 73d3f94..8b134a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -256,6 +256,7 @@ case "${host}" in
force_tls="0"
DSO_LDFLAGS='-shared -Wl,-dylib_install_name,$(@F)'
SOREV="${rev}.${so}"
+ sbrk_deprecated="1"
;;
*-*-freebsd*)
CFLAGS="$CFLAGS"
@@ -825,7 +826,12 @@ fi
dnl Check whether the BSD/SUSv1 sbrk() exists. If not, disable DSS support.
AC_CHECK_FUNC([sbrk], [have_sbrk="1"], [have_sbrk="0"])
if test "x$have_sbrk" = "x1" ; then
- AC_DEFINE([JEMALLOC_HAVE_SBRK], [ ])
+ if test "x$sbrk_deprecated" == "x1" ; then
+ AC_MSG_RESULT([Disabling dss allocation because sbrk is deprecated])
+ enable_dss="0"
+ else
+ AC_DEFINE([JEMALLOC_HAVE_SBRK], [ ])
+ fi
else
enable_dss="0"
fi