Skip to content

Commit

Permalink
jwhois: fix service name
Browse files Browse the repository at this point in the history
after an update of iana-etc the service name of whois changed
  • Loading branch information
Mic92 committed Apr 20, 2017
1 parent f0f9cad commit 080c799
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/tools/networking/jwhois/default.nix
Expand Up @@ -13,7 +13,7 @@ stdenv.mkDerivation {
sed -i -e "s|/usr/bin/lynx|${lynx}/bin/lynx|g" $out/etc/jwhois.conf
'';

patches = [ ./connect.patch ];
patches = [ ./connect.patch ./service-name.patch ];

meta = {
description = "A client for the WHOIS protocol allowing you to query the owner of a domain name";
Expand Down
17 changes: 17 additions & 0 deletions pkgs/tools/networking/jwhois/service-name.patch
@@ -0,0 +1,17 @@
--- a/src/dns.c 2007-06-25 23:58:38.000000000 -0700
+++ b/src/dns.c 2016-06-04 16:20:19.644865127 -0700
@@ -113,12 +113,13 @@
lookup_host_addrinfo(struct addrinfo **res, const char *host, int port)
{
struct addrinfo hints;
- char ascport[10] = "whois";
+ char ascport[10] = "nicname";
int error;

memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;

+ hints.ai_flags = AI_ADDRCONFIG;
hints.ai_socktype = SOCK_STREAM;
if (port)
sprintf(ascport, "%9.9d", port);

0 comments on commit 080c799

Please sign in to comment.