diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-06-12 08:59:15 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-06-12 08:59:15 -0400 |
commit | 9937f4e8ba2260ef2e0eda0883467d1e67d9b011 (patch) | |
tree | 55cdf32f42215d54a5090a163ddb5603e581c558 /rdrand.cpp | |
parent | 6b1a9d5ca8746395d8aaa82205ab5d7816400e4b (diff) | |
download | cryptopp-git-9937f4e8ba2260ef2e0eda0883467d1e67d9b011.tar.gz |
Fix compiler include detection under LLVM and Apple Clang (Issue 183)
Diffstat (limited to 'rdrand.cpp')
-rw-r--r-- | rdrand.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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
|