Page MenuHomeFreeBSD

D45976.diff
No OneTemporary

D45976.diff

diff --git a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c
--- a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c
+++ b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c
@@ -356,7 +356,7 @@
* Note: Sometimes getentropy() can be provided but not implemented
* internally. So we need to check errno for ENOSYS
*/
-# if !defined(__DragonFly__) && !defined(__NetBSD__)
+# if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux)
extern int getentropy(void *buffer, size_t length) __attribute__((weak));
@@ -393,11 +393,12 @@
/* Linux supports this since version 3.17 */
# if defined(__linux) && defined(__NR_getrandom)
return syscall(__NR_getrandom, buf, buflen, 0);
-# elif (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND)
- return sysctl_random(buf, buflen);
# elif (defined(__DragonFly__) && __DragonFly_version >= 500700) \
- || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000)
+ || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000) \
+ || defined(__FreeBSD__)
return getrandom(buf, buflen, 0);
+# elif defined(__NetBSD__) && defined(KERN_ARND)
+ return sysctl_random(buf, buflen);
# else
errno = ENOSYS;
return -1;

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 30, 1:05 AM (4 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26369380
Default Alt Text
D45976.diff (1 KB)

Event Timeline