From f9b91cba1490b65311cc70d1af027b0b1d4fa58a Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 15 Dec 2009 17:41:36 +0000 Subject: [PATCH] In bind_port(), let getaddrinfo() resolve localhost using whatever address family it feels like. As Roland pointed out on privoxy-devel, explicitly asking for AF_INET doesn't work reliably on GNU/Linux: Message-ID: <20091213201632.GA3217@dinghy.sail.spinnaker.de> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534735 https://bugs.launchpad.net/ubuntu/+source/privoxy/+bug/427625 --- jbsockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jbsockets.c b/jbsockets.c index 3d4b2964..5f5c4a20 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,4 +1,4 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.67 2009/09/10 14:53:34 fabiankeil Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.68 2009/10/04 16:38:26 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ @@ -691,7 +691,7 @@ int bind_port(const char *hostnam, int portnum, jb_socket *pfd) } memset(&hints, 0, sizeof(struct addrinfo)); - if ((hostnam == NULL) || !strcmpic(hostnam, "localhost")) + if (hostnam == NULL) { /* * XXX: This is a hack. The right thing to do -- 2.39.2