diff options
author | Jack Lloyd <[email protected]> | 2018-03-09 17:48:31 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-09 17:48:31 -0500 |
commit | acecc97cbe1feead8c437b2fd49b80065d7cbe41 (patch) | |
tree | acc6fa8b1fe9407ca9723734b1e52e01f140b83e | |
parent | 3ecffa3916ec6a0c72a0b2eaa580de05eb4474f7 (diff) |
Fix header for getentropy on macOS
Re #1481
-rw-r--r-- | src/lib/entropy/getentropy/getentropy.cpp | 6 | ||||
-rwxr-xr-x | src/scripts/ci_build.py | 2 |
2 files changed, 7 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 { diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index dfb65d629..5560ced51 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -170,6 +170,8 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, ccache, ro if target_os == 'osx': # Test Boost on OS X flags += ['--with-boost'] + # Travis has 10.12 as default image + flags += ['--with-os-features=getentropy'] elif target_os == 'linux': flags += ['--with-lzma'] |