From: Ruben Kerkhof Date: Wed, 9 Oct 2019 11:47:23 +0000 (+0200) Subject: Only include when needed X-Git-Tag: 5.10.0~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3298%2Fhead;p=thirdparty%2Fcollectd.git Only include when needed This plugin doesn't need sysctl.h on Linux. --- diff --git a/src/contextswitch.c b/src/contextswitch.c index cf3d3daef..d23d07171 100644 --- a/src/contextswitch.c +++ b/src/contextswitch.c @@ -26,11 +26,8 @@ #include "plugin.h" #include "utils/common/common.h" -#ifdef HAVE_SYS_SYSCTL_H +#if defined(HAVE_SYSCTLBYNAME) && defined(HAVE_SYS_SYSCTL_H) #include -#endif - -#if HAVE_SYSCTLBYNAME /* no global variables */ /* #endif HAVE_SYSCTLBYNAME */