diff options
Diffstat (limited to 'mkpasswd.c')
-rw-r--r-- | mkpasswd.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -17,8 +17,15 @@ */ /* for crypt, snprintf and strcasecmp */ -#define _XOPEN_SOURCE -#define _BSD_SOURCE +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 +#endif +#ifndef _BSD_SOURCE +#define _BSD_SOURCE 1 +#endif +#ifndef __EXTENSIONS__ +#define __EXTENSIONS__ 1 +#endif /* System library */ #include <stdio.h> @@ -271,10 +278,9 @@ int main(int argc, char *argv[]) strcat(salt, salt_arg); } else { #ifdef HAVE_SOLARIS_CRYPT_GENSALT -#error "This code path is untested on Solaris. Please send a patch." salt = crypt_gensalt(salt_prefix, NULL); if (!salt) - perror(stderr, "crypt_gensalt"); + perror("crypt_gensalt"); #elif defined HAVE_LINUX_CRYPT_GENSALT void *entropy = get_random_bytes(64); |