From 61936eb1a43e732e4bc1c75b63e6cab85c6f9e94 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Tue, 13 Jan 2015 01:52:56 +0100 Subject: [PATCH] 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 4459a248f2..0374876f71 100644 --- a/modules/core/src/parallel.cpp +++ b/modules/core/src/parallel.cpp @@ -56,7 +56,7 @@ #include #if defined ANDROID #include - #else + #elif defined __APPLE__ #include #endif #endif diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index e552723ed8..51624e18fe 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -163,8 +163,6 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix) #include #if defined ANDROID #include -#else -#include #endif #endif diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp index 24b51c7d28..3d18c6acc8 100644 --- a/modules/highgui/src/cap_ffmpeg_impl.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl.hpp @@ -129,9 +129,9 @@ extern "C" { #include #include #include - #include #include #if defined __APPLE__ + #include #include #include #endif