diff options
author | Marco d'Itri <md@linux.it> | 2014-12-14 23:47:33 +0100 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2014-12-26 19:55:51 +0100 |
commit | 4fa1cd69e45dc29249e8abc413278a7982c996c5 (patch) | |
tree | 00fb6259b34fb62d37fd2d10bfae5b21dace6867 /config.h | |
parent | b207df0805d431d379bba52cff499cbbca288c64 (diff) | |
download | whois-4fa1cd69e45dc29249e8abc413278a7982c996c5.tar.gz |
mkpasswd: use arc4random_buf where available
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -81,6 +81,15 @@ # define RANDOM_DEVICE "/dev/urandom" #endif +/* use arc4random_buf instead if it is available */ +#if (defined __FreeBSD__ && __FreeBSD__ >= 9) || \ + (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || \ + (defined OpenBSD && OpenBSD >= 200805) || \ + (defined __APPLE__ && defined __MACH__) +# define HAVE_ARC4RANDOM_BUF +# undef RANDOM_DEVICE +#endif + #ifdef ENABLE_NLS # ifndef NLS_CAT_NAME # define NLS_CAT_NAME "whois" |