diff options
author | Brent Cook <bcook@openbsd.org> | 2016-01-18 09:50:23 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2016-01-18 09:50:23 -0600 |
commit | 8c91563f603f7021110da231f80e503713340aa6 (patch) | |
tree | 8eca0569fa40f8ed508458779e44a1a97e00493d /include/compat/unistd.h | |
parent | d0ff644edc7ec1ee86c1199fbd25da2f415285cf (diff) | |
download | portable-8c91563f603f7021110da231f80e503713340aa6.tar.gz portable-8c91563f603f7021110da231f80e503713340aa6.tar.bz2 portable-8c91563f603f7021110da231f80e503713340aa6.zip |
add solaris include for getentropy(2)
Diffstat (limited to 'include/compat/unistd.h')
-rw-r--r-- | include/compat/unistd.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/compat/unistd.h b/include/compat/unistd.h index 805c06e..6c83e76 100644 --- a/include/compat/unistd.h +++ b/include/compat/unistd.h | |||
@@ -27,6 +27,13 @@ unsigned int sleep(unsigned int seconds); | |||
27 | 27 | ||
28 | #ifndef HAVE_GETENTROPY | 28 | #ifndef HAVE_GETENTROPY |
29 | int getentropy(void *buf, size_t buflen); | 29 | int getentropy(void *buf, size_t buflen); |
30 | #else | ||
31 | /* | ||
32 | * Solaris 11.3 adds getentropy(2), but defines the function in sys/random.h | ||
33 | */ | ||
34 | #if defined(__sun) | ||
35 | #include <sys/random.h> | ||
36 | #endif | ||
30 | #endif | 37 | #endif |
31 | 38 | ||
32 | #define pledge(request, paths) 0 | 39 | #define pledge(request, paths) 0 |