1 Description: get rid of sysctl includes on Linux
2 The 'sysctl' syscall has been strongly deprecated on Linux for ages.
3 Currently, on old architectures it will spam syslog whenever used, and on
4 newer ones it's missing from the headers altogether. Opencv has migrated
5 away on Linux already, but #include statements were left lingering.
7 This patch removes such #includes on non-__APPLE__, unbreaking x32.
8 Author: Adam Borowski <kilobyte@angband.pl>
10 --- opencv-2.4.9.1+dfsg.orig/modules/core/src/parallel.cpp
11 +++ opencv-2.4.9.1+dfsg/modules/core/src/parallel.cpp
13 #include <sys/types.h>
15 #include <sys/sysconf.h>
16 - #elif !defined __GNU__
17 - #include <sys/sysctl.h>
18 + #elif defined __APPLE__
19 + #include <sys/sysctl.h>
23 --- opencv-2.4.9.1+dfsg.orig/modules/core/src/system.cpp
24 +++ opencv-2.4.9.1+dfsg/modules/core/src/system.cpp
25 @@ -163,8 +163,6 @@ std::wstring GetTempFileNameWinRT(std::w
26 #include <sys/types.h>
28 #include <sys/sysconf.h>
29 -#elif !defined __GNU__
30 -#include <sys/sysctl.h>
34 --- opencv-2.4.9.1+dfsg.orig/modules/highgui/src/cap_ffmpeg_impl.hpp
35 +++ opencv-2.4.9.1+dfsg/modules/highgui/src/cap_ffmpeg_impl.hpp
36 @@ -145,7 +145,7 @@ extern "C" {
38 #if defined WIN32 || defined _WIN32
40 -#elif defined __linux__ || defined __APPLE__
41 +#elif defined __APPLE__
44 #include <sys/types.h>