From 8c91563f603f7021110da231f80e503713340aa6 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 18 Jan 2016 09:50:23 -0600 Subject: add solaris include for getentropy(2) --- include/compat/unistd.h | 7 +++++++ 1 file changed, 7 insertions(+) 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); #ifndef HAVE_GETENTROPY int getentropy(void *buf, size_t buflen); +#else +/* + * Solaris 11.3 adds getentropy(2), but defines the function in sys/random.h + */ +#if defined(__sun) +#include +#endif #endif #define pledge(request, paths) 0 -- cgit v1.2.3-55-g6feb