mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 10:05:05 -07:00
randombytes_internal_random.c: move clang target attribute down
Specifically, move it after the system includes. This appears to address an issue with clang 18 when cross-compiling to windows. Fixes #1413
This commit is contained in:
parent
b4ad79202b
commit
7154fb9041
@ -49,14 +49,6 @@
|
|||||||
#ifdef BLOCK_ON_DEV_RANDOM
|
#ifdef BLOCK_ON_DEV_RANDOM
|
||||||
# include <poll.h>
|
# include <poll.h>
|
||||||
#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 <immintrin.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
#include "crypto_core_hchacha20.h"
|
#include "crypto_core_hchacha20.h"
|
||||||
@ -114,6 +106,15 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
|
|||||||
# endif
|
# endif
|
||||||
#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 <immintrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct InternalRandomGlobal_ {
|
typedef struct InternalRandomGlobal_ {
|
||||||
int initialized;
|
int initialized;
|
||||||
int random_data_source_fd;
|
int random_data_source_fd;
|
||||||
|
Loading…
Reference in New Issue
Block a user