kmscube: new package
[buildroot-gz.git] / package / opencv / 0002-avoid-sysctl_h.patch
blobb63ba55ac1ee5876d63de4998fb3f64bc421b010
1 From e5e71c31d54562f9c67a8226f0bfc08ad24b81cf Mon Sep 17 00:00:00 2001
2 From: Waldemar Brodkorb <wbx@openadk.org>
3 Date: Tue, 1 Nov 2016 09:30:23 +0100
4 Subject: [PATCH 2/4] From upstream master branch:
5 https://github.com/Itseez/opencv/blob/master/modules/core/src/
7 Do not include sysctl.h targeting Linux systems.
9 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
10 [Samuel Martin: convert patch to git diff, add cap_ffmpeg_impl.hpp fix]
11 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
12 ---
13 modules/core/src/parallel.cpp | 2 +-
14 modules/core/src/system.cpp | 2 +-
15 modules/highgui/src/cap_ffmpeg_impl.hpp | 2 +-
16 3 files changed, 3 insertions(+), 3 deletions(-)
18 diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp
19 index 4459a24..0374876 100644
20 --- a/modules/core/src/parallel.cpp
21 +++ b/modules/core/src/parallel.cpp
22 @@ -56,7 +56,7 @@
23 #include <sys/types.h>
24 #if defined ANDROID
25 #include <sys/sysconf.h>
26 - #else
27 + #elif defined __APPLE__
28 #include <sys/sysctl.h>
29 #endif
30 #endif
31 diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
32 index 9a7b262..731f090 100644
33 --- a/modules/core/src/system.cpp
34 +++ b/modules/core/src/system.cpp
35 @@ -163,7 +163,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
36 #include <sys/types.h>
37 #if defined ANDROID
38 #include <sys/sysconf.h>
39 -#else
40 +#elif defined __APPLE__
41 #include <sys/sysctl.h>
42 #endif
43 #endif
44 diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp
45 index dc3e10d..23674ff 100644
46 --- a/modules/highgui/src/cap_ffmpeg_impl.hpp
47 +++ b/modules/highgui/src/cap_ffmpeg_impl.hpp
48 @@ -126,9 +126,9 @@ extern "C" {
49 #include <unistd.h>
50 #include <stdio.h>
51 #include <sys/types.h>
52 - #include <sys/sysctl.h>
53 #include <sys/time.h>
54 #if defined __APPLE__
55 + #include <sys/sysctl.h>
56 #include <mach/clock.h>
57 #include <mach/mach.h>
58 #endif
59 --
60 2.10.2