tor

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

commit 484710f25be73d18fefa1e03339c9247e8ec7337
parent 5a1c3e44f758cda18bb0a0a8ef7c94a0122c85e4
Author: David Goulet <dgoulet@torproject.org>
Date:   Mon,  9 Sep 2019 11:47:37 -0400

build: The <sys/sysctl.h> is now deprecated on Linux

Closes #31673

Diffstat:
Achanges/ticket31673 | 3+++
Msrc/common/compat.c | 8+++++---
2 files changed, 8 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/common/compat.c b/src/common/compat.c @@ -27,9 +27,6 @@ #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#ifdef HAVE_SYS_SYSCTL_H -#include <sys/sysctl.h> -#endif #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif @@ -70,6 +67,11 @@ #include <sys/capability.h> #endif +/* Now deprecated in Linux GLIBC */ +#if defined(HAVE_SYS_SYSCTL_H) && !defined(_WIN32) && !defined(__linux__) +#include <sys/sysctl.h> +#endif + #ifdef _WIN32 #include <conio.h> #include <wchar.h>