diff --git a/src/libsodium/randombytes/internal/randombytes_internal_random.c b/src/libsodium/randombytes/internal/randombytes_internal_random.c index 00bb7033..3edd01c9 100644 --- a/src/libsodium/randombytes/internal/randombytes_internal_random.c +++ b/src/libsodium/randombytes/internal/randombytes_internal_random.c @@ -49,14 +49,6 @@ #ifdef BLOCK_ON_DEV_RANDOM # include #endif -#ifdef HAVE_RDRAND -# ifdef __clang__ -# pragma clang attribute push(__attribute__((target("rdrnd"))), apply_to = function) -# elif defined(__GNUC__) -# pragma GCC target("rdrnd") -# endif -# include -#endif #include "core.h" #include "crypto_core_hchacha20.h" @@ -114,6 +106,15 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength); # endif #endif +#ifdef HAVE_RDRAND +# ifdef __clang__ +# pragma clang attribute push(__attribute__((target("rdrnd"))), apply_to = function) +# elif defined(__GNUC__) +# pragma GCC target("rdrnd") +# endif +# include +#endif + typedef struct InternalRandomGlobal_ { int initialized; int random_data_source_fd;