From 444eff62862551fd984b8173ecb174483d7dbb7b Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 20 Nov 2009 13:28:16 -0500 Subject: 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. --- configure.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'configure.in') 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 +#endif]) # Allow user to specify an alternate syslog facility AC_ARG_WITH(syslog-facility, -- cgit v1.2.3