diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-09-17 18:58:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-09-17 18:58:44 -0400 |
commit | a32646c2ed8a19e5061df4b57d0c27efe6bc357d (patch) | |
tree | 33cdc628308847f33c2c0fc3ed88dc26b22729d9 | |
parent | c76907b54d2e49d4771aa079683ad75cd763b24d (diff) | |
parent | 50f981719f1bc7066496bcc4ef78fcdbb1ff1806 (diff) | |
download | tor-a32646c2ed8a19e5061df4b57d0c27efe6bc357d.tar.gz tor-a32646c2ed8a19e5061df4b57d0c27efe6bc357d.zip |
Merge branch 'maint-0.4.1' into release-0.4.1
-rw-r--r-- | changes/ticket31673 | 3 | ||||
-rw-r--r-- | src/lib/meminfo/meminfo.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/changes/ticket31673 b/changes/ticket31673 new file mode 100644 index 0000000000..3b2bb4a46e --- /dev/null +++ b/changes/ticket31673 @@ -0,0 +1,3 @@ + o New system requirements (build system): + - Do not include the deprecated <sys/sysctl.h> on Linux or Windows system. + Closes 31673; 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. */ |