[opencv] 20/53: Get rid of sysctl includes on Linux.

Nobuhiro Iwamatsu iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

iwamatsu pushed a commit to annotated tag 2.4.13.3
in repository opencv.

commit 61936eb1a43e732e4bc1c75b63e6cab85c6f9e94
Author: Adam Borowski <kilobyte at angband.pl>
Date:   Tue Jan 13 01:52:56 2015 +0100

    Get rid of sysctl includes on Linux.
    
    The 'sysctl' syscall has been strongly deprecated on Linux for ages.
    Currently, on old architectures it will spam syslog whenever used, and on
    newer ones it's missing from the headers altogether.  Opencv has migrated
    away on Linux already, but #includes were left lingering.  This commit
    removes them on non-__APPLE__, unbreaking x32 (and probably others).
---
 modules/core/src/parallel.cpp           | 2 +-
 modules/core/src/system.cpp             | 2 --
 modules/highgui/src/cap_ffmpeg_impl.hpp | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp
index 4459a24..0374876 100644
--- a/modules/core/src/parallel.cpp
+++ b/modules/core/src/parallel.cpp
@@ -56,7 +56,7 @@
     #include <sys/types.h>
     #if defined ANDROID
         #include <sys/sysconf.h>
-    #else
+    #elif defined __APPLE__
         #include <sys/sysctl.h>
     #endif
 #endif
diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
index e552723..51624e1 100644
--- a/modules/core/src/system.cpp
+++ b/modules/core/src/system.cpp
@@ -163,8 +163,6 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
 #include <sys/types.h>
 #if defined ANDROID
 #include <sys/sysconf.h>
-#else
-#include <sys/sysctl.h>
 #endif
 #endif
 
diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp
index 24b51c7..3d18c6a 100644
--- a/modules/highgui/src/cap_ffmpeg_impl.hpp
+++ b/modules/highgui/src/cap_ffmpeg_impl.hpp
@@ -129,9 +129,9 @@ extern "C" {
     #include <unistd.h>
     #include <stdio.h>
     #include <sys/types.h>
-    #include <sys/sysctl.h>
     #include <sys/time.h>
 #if defined __APPLE__
+    #include <sys/sysctl.h>
     #include <mach/clock.h>
     #include <mach/mach.h>
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list