summaryrefslogtreecommitdiffhomepage
path: root/opencv-apple-osx-patch.diff
blob: b7a815caff11bade29b3e67469fc52badfcabb50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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.

The SDK that we're targetting is 10.8.

--- 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)