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