From 9937f4e8ba2260ef2e0eda0883467d1e67d9b011 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 12 Jun 2016 08:59:15 -0400 Subject: Fix compiler include detection under LLVM and Apple Clang (Issue 183) --- rdrand.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rdrand.cpp') 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 // rdseed for some compilers, like GCC # endif +# if defined(__has_include) +# if __has_include() +# include // rdseed for Clang (immintrin.h); rdseed for Clang (rdseedintrin.h) +# endif +# endif #endif #if MASM_RDRAND_ASM_AVAILABLE -- cgit v1.2.1