]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Only include <sys/sysctl.h> when needed 3298/head
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 9 Oct 2019 11:47:23 +0000 (13:47 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 9 Oct 2019 11:47:23 +0000 (13:47 +0200)
This plugin doesn't need sysctl.h on Linux.

src/contextswitch.c

index cf3d3daefe5cb47dc253ef885e356f4fe034c8fb..d23d071713b0e77e5152d0e1c98673ce057c167a 100644 (file)
 #include "plugin.h"
 #include "utils/common/common.h"
 
-#ifdef HAVE_SYS_SYSCTL_H
+#if defined(HAVE_SYSCTLBYNAME) && defined(HAVE_SYS_SYSCTL_H)
 #include <sys/sysctl.h>
-#endif
-
-#if HAVE_SYSCTLBYNAME
 /* no global variables */
 /* #endif HAVE_SYSCTLBYNAME */