about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-04-20 07:32:02 +0200
committerJörg Thalheim <joerg@thalheim.io>2017-04-20 07:33:38 +0200
commit080c799f386e327cc102b3281425da8341c52ea9 (patch)
tree73fb8b4328de9f6e8116069eba7b8d8c5129a2d5
parentf0f9cad9f2ae06018188b39f3947bbbe5f68881e (diff)
jwhois: fix service name
after an update of iana-etc the service name of whois changed
-rw-r--r--pkgs/tools/networking/jwhois/default.nix2
-rw-r--r--pkgs/tools/networking/jwhois/service-name.patch17
2 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/tools/networking/jwhois/default.nix b/pkgs/tools/networking/jwhois/default.nix
index 2a2e444f5b244..1d7932c7ad384 100644
--- a/pkgs/tools/networking/jwhois/default.nix
+++ b/pkgs/tools/networking/jwhois/default.nix
@@ -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";
diff --git a/pkgs/tools/networking/jwhois/service-name.patch b/pkgs/tools/networking/jwhois/service-name.patch
new file mode 100644
index 0000000000000..170eddbad794d
--- /dev/null
+++ b/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);