]> granicus.if.org Git - pgbouncer/commitdiff
on FreeBSD (some others too) the ucred.h has sys/param.h as prereq
authorMarko Kreen <markokr@gmail.com>
Wed, 11 Apr 2007 12:44:26 +0000 (12:44 +0000)
committerMarko Kreen <markokr@gmail.com>
Wed, 11 Apr 2007 12:44:26 +0000 (12:44 +0000)
configure.ac
src/util.c

index 48ee1a6d81ada5159ce7d1b2af9130f860e01a0a..3225764b171654c1419748db57967cad8ab0489b 100644 (file)
@@ -30,7 +30,16 @@ if test x"$GCC" = xyes; then
 fi
 
 dnl Checks for header files.
-AC_CHECK_HEADERS([crypt.h sys/socket.h sys/ucred.h])
+AC_CHECK_HEADERS([crypt.h sys/param.h sys/socket.h])
+dnl ucred.h may have prereqs
+AC_CHECK_HEADERS([sys/ucred.h], [], [], [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_INLINE
index 65f06a06415db516f300bfac2245f35c286924b0..2eb342ea2601f7010cbca874ad39defa0ab865e6 100644 (file)
@@ -24,6 +24,9 @@
 
 #include "md5.h"
 
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
 #ifdef HAVE_SYS_UCRED_H
 #include <sys/ucred.h>
 #endif