Several changes from Debian package 3.0.12 to 3.0.19-1.
[privoxy.git] / debian / patches / 32_bind_fixup.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 32_bind_fixup.dpatch by  <roland@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Work around bind problems on startup (Closes: #534735)
6
7 @DPATCH@
8 diff -urNad '--exclude=CVS' '--exclude=.svn' privoxy~/jbsockets.c privoxy/jbsockets.c
9 --- privoxy~/jbsockets.c
10 +++ privoxy/jbsockets.c
11 @@ -757,20 +757,7 @@
12     }
13  
14     memset(&hints, 0, sizeof(struct addrinfo));
15 -   if (hostnam == NULL)
16 -   {
17 -      /*
18 -       * XXX: This is a hack. The right thing to do
19 -       * would be to bind to both AF_INET and AF_INET6.
20 -       * This will also fail if there is no AF_INET
21 -       * version available.
22 -       */
23 -      hints.ai_family = AF_INET;
24 -   }
25 -   else
26 -   {
27 -      hints.ai_family = AF_UNSPEC;
28 -   }
29 +   hints.ai_family = AF_UNSPEC;
30     hints.ai_socktype = SOCK_STREAM;
31     hints.ai_flags = AI_PASSIVE;
32     hints.ai_protocol = 0; /* Really any stream protocol or TCP only */