From: Zebity Spring Date: Sat, 9 Nov 2019 11:26:39 +0000 (+1100) Subject: Avoid using sysctl on linux X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0405e3e6d5aff60bc4fc96c3168c6f8f49e71415;p=collectd.git Avoid using sysctl on linux --- diff --git a/src/swap.c b/src/swap.c index 61c9e284..0a866322 100644 --- a/src/swap.c +++ b/src/swap.c @@ -49,7 +49,8 @@ #if HAVE_SYS_PARAM_H #include #endif -#if HAVE_SYS_SYSCTL_H +#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME) +/* implies BSD variant */ #include #endif #if HAVE_SYS_DKSTAT_H