summaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authornia <nia@netbsd.org>2020-04-30 14:41:07 +0100
committerMatt Caswell <matt@openssl.org>2020-05-04 08:55:47 +0100
commite2e4b784e65eaafb133a7db3d344446c43112d41 (patch)
tree63c970b82f3d5af7fb90b6c0bea930c611cbf550 /crypto/rand
parente4ec769eb9a18df3593339fc1213dc9441155c90 (diff)
rand_unix.c: Include correct headers for sysctl() on NetBSD
This allows sysctl(KERN_ARND) to be detected properly. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11689)
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/rand_unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index 319c6e4c53..6b6cc78f80 100644
--- a/crypto/rand/rand_unix.c
+++ b/crypto/rand/rand_unix.c
@@ -27,12 +27,12 @@
# include <sys/utsname.h>
# endif
#endif
-#if defined(__FreeBSD__) && !defined(OPENSSL_SYS_UEFI)
+#if (defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(OPENSSL_SYS_UEFI)
# include <sys/types.h>
# include <sys/sysctl.h>
# include <sys/param.h>
#endif
-#if defined(__OpenBSD__) || defined(__NetBSD__)
+#if defined(__OpenBSD__)
# include <sys/param.h>
#endif