]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
build: The <sys/sysctl.h> is now deprecated on Linux
authorDavid Goulet <dgoulet@torproject.org>
Mon, 9 Sep 2019 15:47:37 +0000 (11:47 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 9 Sep 2019 21:05:23 +0000 (17:05 -0400)
Closes #31673

changes/ticket31673 [new file with mode: 0644]
src/common/compat.c

diff --git a/changes/ticket31673 b/changes/ticket31673
new file mode 100644 (file)
index 0000000..3b2bb4a
--- /dev/null
@@ -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;
index ee3bf0fd50d8707029a37b076e6def7f5a57a2bd..e99abcb16d507c64c82681e60e895a199182cf21 100644 (file)
@@ -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
 #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>