]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Revert re-ordering of pagesize definition
authorEdgar Fuß <ef@math.uni-bonn.de>
Thu, 9 Jul 2020 10:42:22 +0000 (12:42 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Jul 2020 10:42:22 +0000 (12:42 +0200)
Revert a re-ordering of #ifdef'd block that may have lead to pagesize being defined, but unused.

src/memory.c

index 60546a0cb93decf6e91c83a007659a987620a840..4bf4ed2c52625da4cecd17197f7be488a6f59130 100644 (file)
@@ -68,10 +68,6 @@ static mach_port_t port_host;
 static vm_size_t pagesize;
 /* #endif HAVE_HOST_STATISTICS */
 
-#elif HAVE_SYSCTL
-static int pagesize;
-/* #endif HAVE_SYSCTL */
-
 #elif HAVE_SYSCTLBYNAME
 /* no global variables */
 /* #endif HAVE_SYSCTLBYNAME */
@@ -86,6 +82,11 @@ static kstat_t *ksp;
 static kstat_t *ksz;
 /* #endif HAVE_LIBKSTAT */
 
+#elif HAVE_SYSCTL && __OpenBSD__
+/* OpenBSD variant does not have sysctlbyname */
+static int pagesize;
+/* #endif HAVE_SYSCTL && __OpenBSD__ */
+
 #elif HAVE_LIBSTATGRAB
 /* no global variables */
 /* endif HAVE_LIBSTATGRAB */