aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-11-20 13:28:16 -0500
committerNick Mathewson <nickm@torproject.org>2009-11-20 13:28:16 -0500
commit444eff62862551fd984b8173ecb174483d7dbb7b (patch)
treed84930a9fba4a5118a90b30049e217cc1292e65f /configure.in
parent1ee580407ccb91304cf7ae24c0d809f57e6b4ccc (diff)
downloadtor-444eff62862551fd984b8173ecb174483d7dbb7b.tar
tor-444eff62862551fd984b8173ecb174483d7dbb7b.tar.gz
Fix compilation on OSX 10.3.
On this OSX version, there is a stub mlockall() function that doesn't work, *and* the declaration for it is hidden by an '#ifdef _P1003_1B_VISIBLE'. This would make autoconf successfully find the function, but our code fail to build when no declaration was found. This patch adds an additional test for the declaration.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 6f2baf7e0..f419fdfd6 100644
--- a/configure.in
+++ b/configure.in
@@ -629,9 +629,14 @@ if test x$tcmalloc = xyes ; then
fi
# By default, we're going to assume we don't have mlockall()
-# bionic and other platforms have various broken mlockall subsystems
-# some of systems don't have a working mlockall, some aren't linkable
+# bionic and other platforms have various broken mlockall subsystems.
+# Some systems don't have a working mlockall, some aren't linkable,
+# and some have it but don't declare it.
AC_CHECK_FUNCS(mlockall)
+AC_CHECK_DECLS([mlockall], , , [
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif])
# Allow user to specify an alternate syslog facility
AC_ARG_WITH(syslog-facility,