aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/entropy
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-09 17:48:31 -0500
committerJack Lloyd <[email protected]>2018-03-09 17:48:31 -0500
commitacecc97cbe1feead8c437b2fd49b80065d7cbe41 (patch)
treeacc6fa8b1fe9407ca9723734b1e52e01f140b83e /src/lib/entropy
parent3ecffa3916ec6a0c72a0b2eaa580de05eb4474f7 (diff)
Fix header for getentropy on macOS
Re #1481
Diffstat (limited to 'src/lib/entropy')
-rw-r--r--src/lib/entropy/getentropy/getentropy.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/entropy/getentropy/getentropy.cpp b/src/lib/entropy/getentropy/getentropy.cpp
index e578a4ed5..15bd8abe8 100644
--- a/src/lib/entropy/getentropy/getentropy.cpp
+++ b/src/lib/entropy/getentropy/getentropy.cpp
@@ -7,7 +7,11 @@
#include <botan/internal/getentropy.h>
-#include <unistd.h>
+#if defined(BOTAN_TARGET_OS_IS_DARWIN)
+ #include <sys/random.h>
+#else
+ #include <unistd.h>
+#endif
namespace Botan {