diff options
author | Marco d'Itri <md@linux.it> | 2018-09-09 01:10:59 +0200 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2018-09-12 02:26:55 +0200 |
commit | 8392fd349dfc25080fcd022a0bbd32e6590c85a8 (patch) | |
tree | daad94d35976b0e78389d46a05dc3cd5233d7581 /config.h | |
parent | 5fc64b5eba57177aa5956bfd0ba274e4782f8078 (diff) | |
download | whois-8392fd349dfc25080fcd022a0bbd32e6590c85a8.tar.gz |
mkpasswd: use perror with crypt and crypt_gensalt
Only some implementations of crypt(3) set errno on errors.
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -95,6 +95,13 @@ # define HAVE_GETENTROPY #endif +/* some versions of crypt(3) set errno on error */ +#if defined __GLIBC__ || (defined __SVR4 && defined __sun) || defined OpenBSD || AIX +# define CRYPT_SETS_ERRNO 1 +#else +# define CRYPT_SETS_ERRNO 0 +#endif + #ifdef ENABLE_NLS # ifndef NLS_CAT_NAME # define NLS_CAT_NAME "whois" |