tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 3b32f2508ca320e63956a3bb746729e1a4fb0190
parent e7565855c0105836857acf9c67363d1f6948e4ac
Author: George Kadianakis <desnacked@riseup.net>
Date:   Wed, 11 Sep 2019 16:19:21 +0300

Merge branch 'tor-github/pr/1307'

Diffstat:
Achanges/ticket31673 | 3+++
Msrc/lib/meminfo/meminfo.c | 7++++---
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/changes/ticket31673 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 @@ -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. */