summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/arc4random/getentropy_linux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/arc4random/getentropy_linux.c b/src/lib/libcrypto/arc4random/getentropy_linux.c
index a845239eb3..408d7fda34 100644
--- a/src/lib/libcrypto/arc4random/getentropy_linux.c
+++ b/src/lib/libcrypto/arc4random/getentropy_linux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getentropy_linux.c,v 1.44 2017/04/29 18:43:31 beck Exp $ */ 1/* $OpenBSD: getentropy_linux.c,v 1.45 2018/03/13 22:53:28 bcook Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> 4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
@@ -74,7 +74,7 @@
74int getentropy(void *buf, size_t len); 74int getentropy(void *buf, size_t len);
75 75
76static int gotdata(char *buf, size_t len); 76static int gotdata(char *buf, size_t len);
77#ifdef SYS_getrandom 77#if defined(SYS_getrandom) && defined(GRND_NONBLOCK)
78static int getentropy_getrandom(void *buf, size_t len); 78static int getentropy_getrandom(void *buf, size_t len);
79#endif 79#endif
80static int getentropy_urandom(void *buf, size_t len); 80static int getentropy_urandom(void *buf, size_t len);
@@ -94,7 +94,7 @@ getentropy(void *buf, size_t len)
94 return (-1); 94 return (-1);
95 } 95 }
96 96
97#ifdef SYS_getrandom 97#if defined(SYS_getrandom) && defined(GRND_NONBLOCK)
98 /* 98 /*
99 * Try descriptor-less getrandom(), in non-blocking mode. 99 * Try descriptor-less getrandom(), in non-blocking mode.
100 * 100 *
@@ -193,7 +193,7 @@ gotdata(char *buf, size_t len)
193 return (0); 193 return (0);
194} 194}
195 195
196#ifdef SYS_getrandom 196#if defined(SYS_getrandom) && defined(GRND_NONBLOCK)
197static int 197static int
198getentropy_getrandom(void *buf, size_t len) 198getentropy_getrandom(void *buf, size_t len)
199{ 199{