]> 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:55:33 +0000 (11:55 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 9 Sep 2019 21:07:08 +0000 (17:07 -0400)
Closes #31673

changes/ticket31673 [new file with mode: 0644]
src/lib/meminfo/meminfo.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 f23318889701fa3a9a95bf9abc09ce521916242b..f4fa45167ef564bea2421fc2d1a8927734cf4a1c 100644 (file)
@@ -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
 #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. */