diff options
Diffstat (limited to 'cipher/random.c')
-rw-r--r-- | cipher/random.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cipher/random.c b/cipher/random.c index d57cd07ce..6f8a20aa1 100644 --- a/cipher/random.c +++ b/cipher/random.c @@ -35,6 +35,7 @@ #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> +#include <unistd.h> #ifdef HAVE_GETHRTIME #include <sys/times.h> #endif @@ -53,6 +54,11 @@ #include "dynload.h" +#ifndef RAND_MAX /* for SunOS */ + #define RAND_MAX 32767 +#endif + + #if SIZEOF_UNSIGNED_LONG == 8 #define ADD_VALUE 0xa5a5a5a5a5a5a5a5 #elif SIZEOF_UNSIGNED_LONG == 4 |