summaryrefslogtreecommitdiffhomepage
path: root/opencv-apple-osx-patch.diff
diff options
context:
space:
mode:
Diffstat (limited to 'opencv-apple-osx-patch.diff')
-rw-r--r--opencv-apple-osx-patch.diff45
1 files changed, 45 insertions, 0 deletions
diff --git a/opencv-apple-osx-patch.diff b/opencv-apple-osx-patch.diff
new file mode 100644
index 0000000..1e64206
--- /dev/null
+++ b/opencv-apple-osx-patch.diff
@@ -0,0 +1,45 @@
+diff --git a/modules/flann/include/opencv2/flann/lsh_table.h b/modules/flann/include/opencv2/flann/lsh_table.h
+index 582dcdb..bfae9de 100644
+
+Using the clang version 'Apple LLVM version 7.0.0 (clang-700.0.72)', we
+need -std=c++11 to link with opentrack which uses -std=c++11.
+
+--- a/modules/flann/include/opencv2/flann/lsh_table.h
++++ b/modules/flann/include/opencv2/flann/lsh_table.h
+@@ -41,7 +41,7 @@
+ #include <limits.h>
+ // TODO as soon as we use C++0x, use the code in USE_UNORDERED_MAP
+ #ifdef __GXX_EXPERIMENTAL_CXX0X__
+-# define USE_UNORDERED_MAP 1
++# define USE_UNORDERED_MAP 0
+ #else
+ # define USE_UNORDERED_MAP 0
+ #endif
+diff --git a/modules/hal/include/opencv2/hal/defs.h b/modules/hal/include/opencv2/hal/defs.h
+index f7d5f35..9d59a28 100644
+--- a/modules/hal/include/opencv2/hal/defs.h
++++ b/modules/hal/include/opencv2/hal/defs.h
+@@ -271,8 +271,8 @@
+
+ #if !defined _MSC_VER && !defined __BORLANDC__
+ # if defined __cplusplus && __cplusplus >= 201103L
+-# include <cstdint>
+- typedef std::uint32_t uint;
++# include <stdint.h>
++ typedef uint32_t uint;
+ # else
+ # include <stdint.h>
+ typedef uint32_t uint;
+diff --git a/modules/objdetect/src/detection_based_tracker.cpp b/modules/objdetect/src/detection_based_tracker.cpp
+index 040784b..59ffb0b 100644
+--- a/modules/objdetect/src/detection_based_tracker.cpp
++++ b/modules/objdetect/src/detection_based_tracker.cpp
+@@ -44,7 +44,7 @@
+ #include "precomp.hpp"
+
+ #if (defined(__cplusplus) && __cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1700)
+-#define USE_STD_THREADS
++#undef USE_STD_THREADS
+ #endif
+
+ #if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID) || defined(USE_STD_THREADS)