]> git.pld-linux.org Git - packages/opencv.git/blob - no-sysctl.patch
- drop references to unused sysctl call/headers
[packages/opencv.git] / no-sysctl.patch
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
12 @@ -56,8 +56,8 @@
13      #include <sys/types.h>
14      #if defined ANDROID
15          #include <sys/sysconf.h>
16 -    #elif !defined __GNU__
17 -        #include <sys/sysctl.h>
18 +     #elif defined __APPLE__
19 +         #include <sys/sysctl.h>
20      #endif
21  #endif
22  
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>
27  #if defined ANDROID
28  #include <sys/sysconf.h>
29 -#elif !defined __GNU__
30 -#include <sys/sysctl.h>
31  #endif
32  #endif
33  
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" {
37  
38  #if defined WIN32 || defined _WIN32
39      #include <windows.h>
40 -#elif defined __linux__ || defined __APPLE__
41 +#elif defined __APPLE__
42      #include <unistd.h>
43      #include <stdio.h>
44      #include <sys/types.h>
This page took 0.022939 seconds and 3 git commands to generate.