Merge pull request #3291 from dago/issue3220
authorMatthias Runge <mrunge@redhat.com>
Fri, 11 Oct 2019 07:54:28 +0000 (09:54 +0200)
committerGitHub <noreply@github.com>
Fri, 11 Oct 2019 07:54:28 +0000 (09:54 +0200)
Link to libnsl.so if needed for inet_ntop()

src/contextswitch.c

index cf3d3da..d23d071 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 */