From daedf582725ddc18551aa38f42f0c2985338c71a Mon Sep 17 00:00:00 2001 From: octo Date: Fri, 21 Apr 2006 14:40:18 +0000 Subject: [PATCH] Corrected inclusion of `sys/swap.h'. Define `HAVE_LIBKSTAT' again if it's present.. --- configure.in | 7 +++++-- src/swap.c | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index e6cb528c..db5a4ceb 100644 --- a/configure.in +++ b/configure.in @@ -181,6 +181,9 @@ AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDriver.h) # For load module AC_CHECK_HEADERS(sys/loadavg.h) +# For the swap module +AC_CHECK_HEADERS(sys/swap.h) + # For users module AC_CHECK_HEADERS(utmp.h) AC_CHECK_HEADERS(utmpx.h) @@ -483,11 +486,11 @@ fi if test "x$with_kstat" = "xyes" then - AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"]) + AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"]) fi if test "x$with_kstat" = "xyes" then - AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"]) + AC_CHECK_LIB(devinfo, di_init,, [with_devinfo="no (not found)"]) AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"]) fi if test "x$with_kstat" = "xyes" diff --git a/src/swap.c b/src/swap.c index 5812b59c..08915032 100644 --- a/src/swap.c +++ b/src/swap.c @@ -32,9 +32,9 @@ # define SWAP_HAVE_READ 0 #endif -#ifdef KERNEL_SOLARIS -#include -#endif /* KERNEL_SOLARIS */ +#if HAVE_SYS_SWAP_H +# include +#endif #undef MAX #define MAX(x,y) ((x) > (y) ? (x) : (y)) -- 2.30.2