summarylogtreecommitdiffstats
path: root/0012-make-header-usable-with-C-compiler.patch
blob: cbe8cac111e919db8a152b8ab7b6d3899f11bd8c (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
From 5cb842feac81067785877392b2fa33eed2e621bc Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Wed, 21 Apr 2021 13:31:08 -0400
Subject: [PATCH 6/8] make-header-usable-with-C-compiler

---
 modules/core/include/opencv2/core/cvdef.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h
index 535883e..0ab8447 100644
--- a/modules/core/include/opencv2/core/cvdef.h
+++ b/modules/core/include/opencv2/core/cvdef.h
@@ -766,6 +766,7 @@ __CV_ENUM_FLAGS_BITWISE_XOR_EQ   (EnumType, EnumType)
 #endif
 
 // Integer types portatibility
+#if defined __cplusplus
 #ifdef OPENCV_STDINT_HEADER
 #include OPENCV_STDINT_HEADER
 #elif defined(__cplusplus)
@@ -808,6 +809,9 @@ typedef ::uint64_t uint64_t;
 #else // pure C
 #include <stdint.h>
 #endif
+#else
+#include <stdint.h>
+#endif
 
 #ifdef __cplusplus
 namespace cv
-- 
2.31.1