jwhois: fix service name

after an update of iana-etc the service name of whois changed

+18 -1
+1 -1
pkgs/tools/networking/jwhois/default.nix
··· 13 13 sed -i -e "s|/usr/bin/lynx|${lynx}/bin/lynx|g" $out/etc/jwhois.conf 14 14 ''; 15 15 16 - patches = [ ./connect.patch ]; 16 + patches = [ ./connect.patch ./service-name.patch ]; 17 17 18 18 meta = { 19 19 description = "A client for the WHOIS protocol allowing you to query the owner of a domain name";
+17
pkgs/tools/networking/jwhois/service-name.patch
··· 1 + --- a/src/dns.c 2007-06-25 23:58:38.000000000 -0700 2 + +++ b/src/dns.c 2016-06-04 16:20:19.644865127 -0700 3 + @@ -113,12 +113,13 @@ 4 + lookup_host_addrinfo(struct addrinfo **res, const char *host, int port) 5 + { 6 + struct addrinfo hints; 7 + - char ascport[10] = "whois"; 8 + + char ascport[10] = "nicname"; 9 + int error; 10 + 11 + memset(&hints, 0, sizeof(hints)); 12 + hints.ai_family = PF_UNSPEC; 13 + 14 + + hints.ai_flags = AI_ADDRCONFIG; 15 + hints.ai_socktype = SOCK_STREAM; 16 + if (port) 17 + sprintf(ascport, "%9.9d", port);