Revision
160
Author
robert@fledge.watson.org
Date
2009-11-15 13:53:40 -0800 (Sun, 15 Nov 2009)

Log Message

Test for sys/sysctl.h before including.

Submitted by:	Joakim Johansson <jocke@tbricks.com>

Modified Paths

Diff

Modified: trunk/configure.ac (159 => 160)


--- trunk/configure.ac	2009-11-15 13:13:45 UTC (rev 159)
+++ trunk/configure.ac	2009-11-15 21:53:40 UTC (rev 160)
@@ -143,7 +143,7 @@
 # Checks for header files.
 #
 AC_HEADER_STDC
-AC_CHECK_HEADERS([TargetConditionals.h pthread_machdep.h pthread_np.h malloc/malloc.h libkern/OSCrossEndian.h libkern/OSAtomic.h])
+AC_CHECK_HEADERS([TargetConditionals.h pthread_machdep.h pthread_np.h malloc/malloc.h libkern/OSCrossEndian.h libkern/OSAtomic.h sys/sysctl.h])
 
 #
 # Core Services is tested in one of the GCD regression tests, so test for its

Modified: trunk/src/internal.h (159 => 160)


--- trunk/src/internal.h	2009-11-15 13:13:45 UTC (rev 159)
+++ trunk/src/internal.h	2009-11-15 21:53:40 UTC (rev 160)
@@ -88,7 +88,9 @@
 #include <sys/mount.h>
 #include <sys/queue.h>
 #include <sys/stat.h>
+#if HAVE_SYS_SYSCTL_H
 #include <sys/sysctl.h>
+#endif
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <netinet/in.h>