mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-16 19:07:52 +08:00
21 lines
756 B
Diff
21 lines
756 B
Diff
diff --git a/random/rndgetentropy.c b/random/rndgetentropy.c
|
|
index 513da0b95..a6f3c4ab1 100644
|
|
--- a/random/rndgetentropy.c
|
|
+++ b/random/rndgetentropy.c
|
|
@@ -81,6 +81,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t,
|
|
do
|
|
{
|
|
_gcry_pre_syscall ();
|
|
+#ifdef GRND_RANDOM
|
|
if (fips_mode ())
|
|
{
|
|
/* DRBG chaining defined in SP 800-90A (rev 1) specify
|
|
@@ -98,6 +99,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t,
|
|
ret = getrandom (buffer, nbytes, GRND_RANDOM);
|
|
}
|
|
else
|
|
+#endif
|
|
{
|
|
nbytes = length < sizeof (buffer) ? length : sizeof (buffer);
|
|
ret = getentropy (buffer, nbytes);
|