]>
Commit | Line | Data |
---|---|---|
f9e8f4ea JR |
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. | |
6 | . | |
7 | This patch removes such #includes on non-__APPLE__, unbreaking x32. | |
8 | Author: Adam Borowski <kilobyte@angband.pl> | |
9 | ||
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 | |
a60ff91d | 12 | @@ -56,7 +56,7 @@ |
f9e8f4ea JR |
13 | #include <sys/types.h> |
14 | #if defined ANDROID | |
15 | #include <sys/sysconf.h> | |
a60ff91d JR |
16 | - #else |
17 | + #elif defined __APPLE__ | |
18 | #include <sys/sysctl.h> | |
f9e8f4ea JR |
19 | #endif |
20 | #endif | |
f9e8f4ea JR |
21 | --- opencv-2.4.9.1+dfsg.orig/modules/core/src/system.cpp |
22 | +++ opencv-2.4.9.1+dfsg/modules/core/src/system.cpp | |
23 | @@ -163,8 +163,6 @@ std::wstring GetTempFileNameWinRT(std::w | |
24 | #include <sys/types.h> | |
25 | #if defined ANDROID | |
26 | #include <sys/sysconf.h> | |
a60ff91d | 27 | -#else |
f9e8f4ea JR |
28 | -#include <sys/sysctl.h> |
29 | #endif | |
30 | #endif | |
31 | ||
32 | --- opencv-2.4.9.1+dfsg.orig/modules/highgui/src/cap_ffmpeg_impl.hpp | |
33 | +++ opencv-2.4.9.1+dfsg/modules/highgui/src/cap_ffmpeg_impl.hpp | |
34 | @@ -145,7 +145,7 @@ extern "C" { | |
35 | ||
36 | #if defined WIN32 || defined _WIN32 | |
37 | #include <windows.h> | |
38 | -#elif defined __linux__ || defined __APPLE__ | |
39 | +#elif defined __APPLE__ | |
40 | #include <unistd.h> | |
41 | #include <stdio.h> | |
42 | #include <sys/types.h> |