From: Marko Kreen Date: Wed, 11 Apr 2007 12:44:26 +0000 (+0000) Subject: on FreeBSD (some others too) the ucred.h has sys/param.h as prereq X-Git-Tag: pgbouncer_1_0_6~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75525a4b84d5003e44f17c1c4c17374da9436b71;p=pgbouncer on FreeBSD (some others too) the ucred.h has sys/param.h as prereq --- diff --git a/configure.ac b/configure.ac index 48ee1a6..3225764 100644 --- a/configure.ac +++ b/configure.ac @@ -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 +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif +]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE diff --git a/src/util.c b/src/util.c index 65f06a0..2eb342e 100644 --- a/src/util.c +++ b/src/util.c @@ -24,6 +24,9 @@ #include "md5.h" +#ifdef HAVE_SYS_PARAM_H +#include +#endif #ifdef HAVE_SYS_UCRED_H #include #endif