Skip to content

Commit 688f956

Browse files
committed
Merge pull request #92488 from TCROC/fix-cpuidex-mingw
Fix use of undeclared identifier `__cpuidex` error on MinGW
2 parents 1ee9530 + 0937188 commit 688f956

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

thirdparty/embree/common/sys/sysinfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ namespace embree
295295
if (nIds >= 1) __cpuid (cpuid_leaf_1,0x00000001);
296296
#if _WIN32
297297
#if _MSC_VER && (_MSC_FULL_VER < 160040219)
298-
#else
298+
#elif defined(_MSC_VER)
299299
if (nIds >= 7) __cpuidex(cpuid_leaf_7,0x00000007,0);
300300
#endif
301301
#else
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/thirdparty/embree/common/sys/sysinfo.cpp b/thirdparty/embree/common/sys/sysinfo.cpp
2+
index d01eab3c9d..4ecab05265 100644
3+
--- a/thirdparty/embree/common/sys/sysinfo.cpp
4+
+++ b/thirdparty/embree/common/sys/sysinfo.cpp
5+
@@ -295,7 +295,7 @@ namespace embree
6+
if (nIds >= 1) __cpuid (cpuid_leaf_1,0x00000001);
7+
#if _WIN32
8+
#if _MSC_VER && (_MSC_FULL_VER < 160040219)
9+
-#else
10+
+#elif defined(_MSC_VER)
11+
if (nIds >= 7) __cpuidex(cpuid_leaf_7,0x00000007,0);
12+
#endif
13+
#else

0 commit comments

Comments
 (0)