Cleanup includes in rand_unix.c
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 4 Sep 2019 09:39:54 +0000 (11:39 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 5 Sep 2019 06:31:10 +0000 (08:31 +0200)
Fixes #9757

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9761)

crypto/rand/rand_unix.c

index e59882cde7f561115591b524ba14fa6d8d431ac1..fb8a7b7c6dd95777c1b14485e081675d8c69f95b 100644 (file)
 #include "internal/rand_int.h"
 #include <stdio.h>
 #include "internal/dso.h"
 #include "internal/rand_int.h"
 #include <stdio.h>
 #include "internal/dso.h"
-#if defined(__linux)
-# include <asm/unistd.h>
-# include <sys/ipc.h>
-# include <sys/shm.h>
-# include <sys/utsname.h>
+#ifdef __linux
+# include <sys/syscall.h>
+# ifdef DEVRANDOM_WAIT
+#  include <sys/shm.h>
+#  include <sys/utsname.h>
+# endif
 #endif
 #if defined(__FreeBSD__) && !defined(OPENSSL_SYS_UEFI)
 # include <sys/types.h>
 #endif
 #if defined(__FreeBSD__) && !defined(OPENSSL_SYS_UEFI)
 # include <sys/types.h>