aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-05-06 23:19:59 +0000
committerlloyd <[email protected]>2010-05-06 23:19:59 +0000
commit75e9bcad2f3a8a42f5b4579db7034a35e15fc872 (patch)
treee18e43aacaf377e6e9ad06bbb91047b05261a512 /src/utils
parent1e10b45b171fde455d32ed34a3aafa0bf90f3b4e (diff)
Avoid trying to use GCC's cpuid.h in versions where it doesn't exist
(before 4.3). Probably will need to write asm blocks for those older versions.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/cpuid.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/cpuid.cpp b/src/utils/cpuid.cpp
index 8d801b75f..e4f5a1318 100644
--- a/src/utils/cpuid.cpp
+++ b/src/utils/cpuid.cpp
@@ -26,8 +26,10 @@
#include <ia32intrin.h>
#define CALL_CPUID(type, out) do { __cpuid(out, type); } while(0);
-#elif defined(BOTAN_BUILD_COMPILER_IS_GCC)
+#elif defined(BOTAN_BUILD_COMPILER_IS_GCC) && \
+ ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+ // Only available starting in GCC 4.3
#include <cpuid.h>
#define CALL_CPUID(type, out) \
do { __get_cpuid(type, out, out+1, out+2, out+3); } while(0);