0002-avoid-sysctl_h.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From e5e71c31d54562f9c67a8226f0bfc08ad24b81cf Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Tue, 1 Nov 2016 09:30:23 +0100
  4. Subject: [PATCH 2/4] From upstream master branch:
  5. https://github.com/Itseez/opencv/blob/master/modules/core/src/
  6. Do not include sysctl.h targeting Linux systems.
  7. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  8. [Samuel Martin: convert patch to git diff, add cap_ffmpeg_impl.hpp fix]
  9. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  10. ---
  11. modules/core/src/parallel.cpp | 2 +-
  12. modules/core/src/system.cpp | 2 +-
  13. modules/highgui/src/cap_ffmpeg_impl.hpp | 2 +-
  14. 3 files changed, 3 insertions(+), 3 deletions(-)
  15. diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp
  16. index 4459a24..0374876 100644
  17. --- a/modules/core/src/parallel.cpp
  18. +++ b/modules/core/src/parallel.cpp
  19. @@ -56,7 +56,7 @@
  20. #include <sys/types.h>
  21. #if defined ANDROID
  22. #include <sys/sysconf.h>
  23. - #else
  24. + #elif defined __APPLE__
  25. #include <sys/sysctl.h>
  26. #endif
  27. #endif
  28. diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
  29. index 9a7b262..731f090 100644
  30. --- a/modules/core/src/system.cpp
  31. +++ b/modules/core/src/system.cpp
  32. @@ -163,7 +163,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
  33. #include <sys/types.h>
  34. #if defined ANDROID
  35. #include <sys/sysconf.h>
  36. -#else
  37. +#elif defined __APPLE__
  38. #include <sys/sysctl.h>
  39. #endif
  40. #endif
  41. diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp
  42. index dc3e10d..23674ff 100644
  43. --- a/modules/highgui/src/cap_ffmpeg_impl.hpp
  44. +++ b/modules/highgui/src/cap_ffmpeg_impl.hpp
  45. @@ -126,9 +126,9 @@ extern "C" {
  46. #include <unistd.h>
  47. #include <stdio.h>
  48. #include <sys/types.h>
  49. - #include <sys/sysctl.h>
  50. #include <sys/time.h>
  51. #if defined __APPLE__
  52. + #include <sys/sysctl.h>
  53. #include <mach/clock.h>
  54. #include <mach/mach.h>
  55. #endif
  56. --
  57. 2.10.2