From 75525a4b84d5003e44f17c1c4c17374da9436b71 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 11 Apr 2007 12:44:26 +0000 Subject: [PATCH] on FreeBSD (some others too) the ucred.h has sys/param.h as prereq --- configure.ac | 11 ++++++++++- src/util.c | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) 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 -- 2.40.0