Avoid using sysctl on linux
authorZebity Spring <zebity@yahoo.com>
Sat, 9 Nov 2019 11:26:39 +0000 (22:26 +1100)
committerZebity Spring <zebity@yahoo.com>
Sat, 9 Nov 2019 11:26:39 +0000 (22:26 +1100)
src/swap.c

index 61c9e28..0a86632 100644 (file)
@@ -49,7 +49,8 @@
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#if HAVE_SYS_SYSCTL_H
+#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)
+/* implies BSD variant */
 #include <sys/sysctl.h>
 #endif
 #if HAVE_SYS_DKSTAT_H