Reorder need_bind in struct configuration_spec to save memory
[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 Forwarded: not-needed
6
7 --- a/jbsockets.c
8 +++ b/jbsockets.c
9 @@ -918,20 +918,7 @@ int bind_port(const char *hostnam, int p
10     }
11  
12     memset(&hints, 0, sizeof(struct addrinfo));
13 -   if (hostnam == NULL)
14 -   {
15 -      /*
16 -       * XXX: This is a hack. The right thing to do
17 -       * would be to bind to both AF_INET and AF_INET6.
18 -       * This will also fail if there is no AF_INET
19 -       * version available.
20 -       */
21 -      hints.ai_family = AF_INET;
22 -   }
23 -   else
24 -   {
25 -      hints.ai_family = AF_UNSPEC;
26 -   }
27 +   hints.ai_family = AF_UNSPEC;
28     hints.ai_socktype = SOCK_STREAM;
29     hints.ai_flags = AI_PASSIVE;
30     hints.ai_protocol = 0; /* Really any stream protocol or TCP only */