summaryrefslogtreecommitdiff
path: root/src/lib/meminfo
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-09-11 16:19:21 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2019-09-11 16:19:21 +0300
commit3b32f2508ca320e63956a3bb746729e1a4fb0190 (patch)
treebd7c41f17cdf3698cad4fe7baee12d79af6fa82c /src/lib/meminfo
parente7565855c0105836857acf9c67363d1f6948e4ac (diff)
parent409df19b5a0053175f05851086e6ef35c5bce2c0 (diff)
downloadtor-3b32f2508ca320e63956a3bb746729e1a4fb0190.tar.gz
tor-3b32f2508ca320e63956a3bb746729e1a4fb0190.zip
Merge branch 'tor-github/pr/1307'
Diffstat (limited to 'src/lib/meminfo')
-rw-r--r--src/lib/meminfo/meminfo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/meminfo/meminfo.c b/src/lib/meminfo/meminfo.c
index f233188897..f4fa45167e 100644
--- a/src/lib/meminfo/meminfo.c
+++ b/src/lib/meminfo/meminfo.c
@@ -18,9 +18,6 @@
#include "lib/log/log.h"
#include "lib/malloc/malloc.h"
-#ifdef HAVE_SYS_SYSCTL_H
-#include <sys/sysctl.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -36,6 +33,10 @@
#endif
#include <string.h>
+#if defined(HAVE_SYS_SYSCTL_H) && !defined(_WIN32) && !defined(__linux__)
+#include <sys/sysctl.h>
+#endif
+
DISABLE_GCC_WARNING(aggregate-return)
/** Call the platform malloc info function, and dump the results to the log at
* level <b>severity</b>. If no such function exists, do nothing. */