#! /bin/sh /usr/share/dpatch/dpatch-run
## 017_fix_ipv6 by Adam Conrad <adconrad@0c3.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Make IPv6 work on Linux, where binding v6only doesn't.

@DPATCH@
--- apache2/server/listen.c	2003-03-31 05:30:52.000000000 +0100
+++ apache2/server/listen.c	2003-11-12 13:39:07.000000000 +0000
@@ -117,6 +117,7 @@
         return stat;
     }
 
+#ifndef __linux__
 #if APR_HAVE_IPV6
     if (server->bind_addr->family == APR_INET6) {
         stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting);
@@ -129,8 +130,9 @@
             return stat;
         }
     }
-#endif
-
+#endif /* APR_HAVE_IPV6 */
+#endif /* __linux__ */
+    
     /*
      * To send data over high bandwidth-delay connections at full
      * speed we must force the TCP window to open wide enough to keep the
