Fix build when linux-headers are not installed.
linux/random.h is not really needed if FIPS mode is not enabled. Note
that use of the getrandom syscall is unaffected by this header.
Fixes commit bc7daec4d833ed399571cf847221bb3065fbc9ab
Change-Id: Ia367aeffb3f2802ba97fd1507de0b718d9ac2c55
Reviewed-on: https://boringssl-review.googlesource.com/19644
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/fipsmodule/rand/urandom.c b/crypto/fipsmodule/rand/urandom.c
index 5430968..d2be719 100644
--- a/crypto/fipsmodule/rand/urandom.c
+++ b/crypto/fipsmodule/rand/urandom.c
@@ -29,8 +29,10 @@
#include <unistd.h>
#if defined(OPENSSL_LINUX)
+#if defined(BORINGSSL_FIPS)
#include <linux/random.h>
#include <sys/ioctl.h>
+#endif
#include <sys/syscall.h>
#endif