aeff272085017746c68571a6c6d5c450676c9fd6
[privoxy.git] / debian / patches / 32_bind_fixup.patch
1 From: Roland Rosenfeld <roland@debian.org>
2 Date: Tue, 18 May 2010 10:14:18 +0200
3 Subject: Work around bind problems on startup (Closes: #534735)
4 Bug-Debian: https://bugs.debian.org/534735
5
6 --- a/jbsockets.c
7 +++ b/jbsockets.c
8 @@ -975,20 +975,7 @@ int bind_port(const char *hostnam, int p
9     }
10  
11     memset(&hints, 0, sizeof(struct addrinfo));
12 -   if (hostnam == NULL)
13 -   {
14 -      /*
15 -       * XXX: This is a hack. The right thing to do
16 -       * would be to bind to both AF_INET and AF_INET6.
17 -       * This will also fail if there is no AF_INET
18 -       * version available.
19 -       */
20 -      hints.ai_family = AF_INET;
21 -   }
22 -   else
23 -   {
24 -      hints.ai_family = AF_UNSPEC;
25 -   }
26 +   hints.ai_family = AF_UNSPEC;
27     hints.ai_socktype = SOCK_STREAM;
28     hints.ai_flags = AI_PASSIVE;
29     hints.ai_protocol = 0; /* Really any stream protocol or TCP only */