rand_unix.c: Include correct headers for sysctl() on NetBSD
authornia <nia@netbsd.org>
Thu, 30 Apr 2020 13:41:07 +0000 (14:41 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 4 May 2020 08:04:40 +0000 (09:04 +0100)
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)

(cherry picked from commit e2e4b784e65eaafb133a7db3d344446c43112d41)

crypto/rand/rand_unix.c

index fe457cab4a3b1a0c45ed91ecb732e0920771dfe0..6d30d35b90ada4536405344b502dcc5d544aa51d 100644 (file)
 #  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