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 07:55:47 +0000 (08:55 +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)

crypto/rand/rand_unix.c

index 319c6e4c53fa763bf553c3dbbce8344662a4ec98..6b6cc78f80cc5d7ffde47ff07ba36d5abaac401f 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