From 45eb26992d9fa4efd74b7b283834dcfc212a403f Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 4 Apr 2014 14:07:51 +0400 Subject: whois (5.1.1+dyson1) unstable; urgency=medium * Package for Dyson * Patched mkpasswd.c: - Define _XOPEN_SOURCE to 600 if not defined - Define _BSD_SOURCE to 1 if not defined - Define __EXTENSIONS__ to 1 to get getpass() exposed (otherwise mkpasswd crashes, because compiler assumes getpass returns int) - Removed #error "This code path is untested on Solaris. Please send a patch." - Fixed perror() invocation in HAVE_SOLARIS_CRYPT_GENSALT branch * Patched make_version_h.pl to support +dysonN suffix in version --- mkpasswd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mkpasswd.c') diff --git a/mkpasswd.c b/mkpasswd.c index 45d2c34..a80e7e9 100644 --- a/mkpasswd.c +++ b/mkpasswd.c @@ -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 @@ -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); -- cgit v1.2.3