apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From INOUE Seiichiro <in...@ariel-networks.com>
Subject [PATCH] IPv6 patch for apr_socket_accept() on Windows XP
Date Thu, 02 Oct 2003 15:07:11 GMT
Hi all,

I think the following patch is required for IPv6 support on Windows XP.

RCS file: /home/cvspublic/apr/network_io/win32/sockets.c,v
retrieving revision 1.98
diff -u -r1.98 sockets.c
--- sockets.c   3 Sep 2003 16:31:47 -0000       1.98
+++ sockets.c   2 Oct 2003 14:54:19 -0000
@@ -247,7 +247,11 @@
                                             apr_socket_t *sock, apr_pool_t *p)
 {
     SOCKET s;
+#if APR_HAVE_IPV6
+    struct sockaddr_storage sa;
+#else
     struct sockaddr sa;
+#endif
     int salen = sizeof(sock->remote_addr->sa);
 
     /* Don't allocate the memory until after we call accept. This allows



FYI,
It looks libapr programs work well on IPv6 network, which are compiled by VC7(aka .NET) on
Windows XP,
with the following additional changes for /include/apr.hw.


@@ -125,6 +125,7 @@
 #define SW_HIDE             0
 #ifndef _WIN32_WCE
 #include <winsock2.h>
+#include <ws2tcpip.h>
 #include <mswsock.h>
 #else
 #include <winsock.h>
@@ -244,7 +245,11 @@
 #define APR_HAVE_IN_ADDR        1
 #define APR_HAVE_INET_ADDR      1
 #define APR_HAVE_INET_NETWORK   0
-#define APR_HAVE_IPV6           0
+#define APR_HAVE_IPV6           1
+#ifdef APR_HAVE_IPV6
+#define HAVE_GETADDRINFO        1
+#define HAVE_GETNAMEINFO        1
+#endif
 #define APR_HAVE_MEMMOVE        1
 #define APR_HAVE_SETRLIMIT      0
 #define APR_HAVE_SIGACTION      0



Thanks.
- INOUE Seiichiro <inoue@ariel-networks.com>
http://www.ariel-networks.com

Mime
View raw message