From 7b0d1c932e502a7f157222cb683531e2849de393 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/videoio/src/cap_ffmpeg_impl.hpp | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp index 5a51230..1fb980d 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 d9a2087..1f9d686 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/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp index bd967f9..5870f4b 100644 --- a/modules/videoio/src/cap_ffmpeg_impl.hpp +++ b/modules/videoio/src/cap_ffmpeg_impl.hpp @@ -139,8 +139,10 @@ extern "C" { #include #include #include +#if defined __APPLE__ #include #endif +#endif #ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) -- 2.7.4