From: Adam Borowski Date: Tue, 13 Jan 2015 00:52:56 +0000 (+0100) Subject: Get rid of sysctl includes on Linux. X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~2744^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b0d1c932e502a7f157222cb683531e2849de393;p=platform%2Fupstream%2Fopencv.git 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). --- 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))