diff options
author | Guillem Jover <guillem@hadrons.org> | 2015-12-02 03:08:17 +0100 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2015-12-02 03:08:17 +0100 |
commit | 75729394af82faf54721cd40c0c8c258954082dc (patch) | |
tree | 39a525627e86b5a65eacf3242849740ac755503c /src/arc4random.h | |
parent | 8493c7f27da2dcd2de71e9c7782c3d020d89c2a2 (diff) |
Unify most arc4random Unix hooks into a single file
The Unix hook should work for most Unix-like systems, move glibc
specific code there and a FreeBSd specific comment, and remove the rest.
Also change the code to always fallback to use the generic Unix code.
This should cover GNU/Hurd and GNU/kFreeBSD among others.
Diffstat (limited to 'src/arc4random.h')
-rw-r--r-- | src/arc4random.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/arc4random.h b/src/arc4random.h index de52922..0887e86 100644 --- a/src/arc4random.h +++ b/src/arc4random.h @@ -6,24 +6,10 @@ int getentropy(void *buf, size_t len); -#if defined(__linux__) -#include "arc4random_linux.h" -#elif defined(__FreeBSD__) -#include "arc4random_bsd.h" -#elif defined(__NetBSD__) -#include "arc4random_bsd.h" -#elif defined(__OpenBSD__) +#if defined(__OpenBSD__) #include "arc4random_openbsd.h" -#elif defined(__sun) -#include "arc4random_unix.h" -#elif defined(__APPLE__) -#include "arc4random_unix.h" -#elif defined(_AIX) -#include "arc4random_unix.h" -#elif defined(__hpux) -#include "arc4random_unix.h" #else -#error "No arc4random hooks defined for this platform." +#include "arc4random_unix.h" #endif #endif |