summaryrefslogtreecommitdiff
path: root/rdrand.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-06-12 08:59:15 -0400
committerJeffrey Walton <noloader@gmail.com>2016-06-12 08:59:15 -0400
commit9937f4e8ba2260ef2e0eda0883467d1e67d9b011 (patch)
tree55cdf32f42215d54a5090a163ddb5603e581c558 /rdrand.cpp
parent6b1a9d5ca8746395d8aaa82205ab5d7816400e4b (diff)
downloadcryptopp-git-9937f4e8ba2260ef2e0eda0883467d1e67d9b011.tar.gz
Fix compiler include detection under LLVM and Apple Clang (Issue 183)
Diffstat (limited to 'rdrand.cpp')
-rw-r--r--rdrand.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/rdrand.cpp b/rdrand.cpp
index 55fde3ab..3a988b4c 100644
--- a/rdrand.cpp
+++ b/rdrand.cpp
@@ -135,6 +135,11 @@
# if defined(__GNUC__) && (CRYPTOPP_GCC_VERSION >= 40600)
# include <x86intrin.h> // rdseed for some compilers, like GCC
# endif
+# if defined(__has_include)
+# if __has_include(<x86intrin.h>)
+# include <x86intrin.h> // rdseed for Clang (immintrin.h); rdseed for Clang (rdseedintrin.h)
+# endif
+# endif
#endif
#if MASM_RDRAND_ASM_AVAILABLE