aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-06-17 14:36:34 -0700
committerChris Robinson <[email protected]>2022-06-17 14:36:34 -0700
commitfcc73d332409c31f55c4387a0a94fa3a2830068f (patch)
tree64df92da4783e83a6edcb447dc4e2c141d2b069e
parent314ba2f3903296e10a6212da6c8d9ee84a694df6 (diff)
Avoid including intrin.h with cpuid.h
On certain versions of MinGW, that leads to a redefinition errors.
-rw-r--r--core/cpu_caps.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/cpu_caps.cpp b/core/cpu_caps.cpp
index 8211b331..0325cd49 100644
--- a/core/cpu_caps.cpp
+++ b/core/cpu_caps.cpp
@@ -11,11 +11,10 @@
#endif
#endif
-#ifdef HAVE_INTRIN_H
-#include <intrin.h>
-#endif
-#ifdef HAVE_CPUID_H
+#if defined(HAVE_CPUID_H)
#include <cpuid.h>
+#elif defined(HAVE_INTRIN_H)
+#include <intrin.h>
#endif
#include <array>