From: Matthias Runge Date: Fri, 11 Oct 2019 06:59:29 +0000 (+0200) Subject: Merge pull request #3298 from rubenk/contextswitch-nosysctl-h X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=90d514946634caca37c409233513c14ffb0d98e0;hp=ebb558dd443046558eaf0bb3ec51566ad305190f;p=collectd.git Merge pull request #3298 from rubenk/contextswitch-nosysctl-h Only include when needed --- diff --git a/src/contextswitch.c b/src/contextswitch.c index cf3d3dae..d23d0717 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 */