summaryrefslogtreecommitdiff
path: root/debian/patches/fix_without_sysctl.patch
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-09-30 19:01:58 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-09-30 19:01:58 +0300
commiteedc83800a867d34156b5c313510707a17016c6b (patch)
treee2f5a0fc92887ff915f37815d0f8cfe902032c2e /debian/patches/fix_without_sysctl.patch
downloadopencv-debian.tar.gz
Imported opencv 2.4.9.1+dfsg1-2debian/2.4.9.1+dfsg1-2debian
Diffstat (limited to 'debian/patches/fix_without_sysctl.patch')
-rw-r--r--debian/patches/fix_without_sysctl.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/patches/fix_without_sysctl.patch b/debian/patches/fix_without_sysctl.patch
new file mode 100644
index 0000000..e16b4f1
--- /dev/null
+++ b/debian/patches/fix_without_sysctl.patch
@@ -0,0 +1,55 @@
+Description: Don't use sysctl on unsupported targets
+Author: Thorsten Glaser <tg@mirbsd.de>
+Forwarded: not yet
+Debian-Bug: 792264
+Last-Update: <2016-02-08>
+
+--- opencv-2.4.9.1+dfsg.orig/CMakeLists.txt
++++ opencv-2.4.9.1+dfsg/CMakeLists.txt
+@@ -441,6 +441,8 @@ if(UNIX)
+ else()
+ set(HAVE_LIBPTHREAD YES)
+ endif()
++
++ CHECK_INCLUDE_FILE(sys/sysctl.h HAVE_SYS_SYSCTL_H)
+ endif()
+
+ include(cmake/OpenCVPCHSupport.cmake)
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/parallel.cpp
++++ opencv-2.4.9.1+dfsg/modules/core/src/parallel.cpp
+@@ -57,7 +57,9 @@
+ #if defined ANDROID
+ #include <sys/sysconf.h>
+ #elif !defined __GNU__
++ #ifdef HAVE_SYS_SYSCTL_H
+ #include <sys/sysctl.h>
++ #endif
+ #endif
+ #endif
+
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/system.cpp
++++ opencv-2.4.9.1+dfsg/modules/core/src/system.cpp
+@@ -164,9 +164,11 @@ std::wstring GetTempFileNameWinRT(std::w
+ #if defined ANDROID
+ #include <sys/sysconf.h>
+ #elif !defined __GNU__
++#ifdef HAVE_SYS_SYSCTL_H
+ #include <sys/sysctl.h>
+ #endif
+ #endif
++#endif
+
+ #ifdef ANDROID
+ # include <android/log.h>
+--- opencv-2.4.9.1+dfsg.orig/modules/highgui/src/cap_ffmpeg_impl.hpp
++++ opencv-2.4.9.1+dfsg/modules/highgui/src/cap_ffmpeg_impl.hpp
+@@ -149,7 +149,9 @@ extern "C" {
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <sys/types.h>
++ #ifdef HAVE_SYS_SYSCTL_H
+ #include <sys/sysctl.h>
++ #endif
+ #endif
+
+ #ifndef MIN