From 8fce2979d3fec72400654ce7986297d7579868c2 Mon Sep 17 00:00:00 2001 From: Landry Breuil Date: Mon, 17 Nov 2014 11:39:11 +0100 Subject: [PATCH] Detect sys/vmmeter.h and include it if available. Needed on OpenBSD for struct vmtotal definition. --- configure.ac | 2 +- src/memory.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 73410500..c6204cf2 100644 --- a/configure.ac +++ b/configure.ac @@ -527,7 +527,7 @@ AC_CHECK_HEADERS(linux/un.h, [], [], #endif ]) -AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h locale.h) +AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h sys/vmmeter.h kvm.h wordexp.h locale.h) # For the dns plugin AC_CHECK_HEADERS(arpa/nameser.h) diff --git a/src/memory.c b/src/memory.c index 0f5e1a00..7e7fd8e5 100644 --- a/src/memory.c +++ b/src/memory.c @@ -30,6 +30,9 @@ #ifdef HAVE_SYS_SYSCTL_H # include #endif +#ifdef HAVE_SYS_VMMETER_H +# include +#endif #ifdef HAVE_MACH_KERN_RETURN_H # include -- 2.11.0