[gnet-dev] Re: GNet patch



Here it is : gnet.c.diff and tcp.c.diff in attachement.

David.

On Fri, 2004-09-24 at 02:47, David Helder wrote:
> David,
> 
> Could you resend your Gnet patch.  I think it got lost in Mailman.  
> Sorry.
> 
> Thanks,
> David
> 
> --
> David Helder - dhelder gizmolabs org - http://www.gizmolabs.org/~dhelder
> 
> 
--- gnet-2.0.5/src/gnet.c	Tue Oct 28 00:47:38 2003
+++ gnet-2.0.5-patched/src/gnet.c	Wed Sep  8 16:01:53 2004
@@ -78,6 +78,7 @@
 #else /* Windows */
 	GIPv6Policy policy;
 
+  #ifdef HAVE_IPV6
 	hLibrary_ws2_32 = LoadLibrary("ws2_32.dll");
 	hLibrary_Iphlpapi = LoadLibrary("Iphlpapi.dll");
 	if (hLibrary_ws2_32)
@@ -104,6 +105,9 @@
 	}
 
 	/* Should I check to see if IPv6 interfaces exist? */
+  #else /* no IPV6 */
+	policy = GIPV6_POLICY_IPV4_ONLY;  
+  #endif
 
 	gnet_ipv6_set_policy (policy);
 
--- gnet-2.0.5/src/tcp.c	Tue Jan 20 02:47:55 2004
+++ gnet-2.0.5-patched/src/tcp.c	Wed Sep  8 16:02:12 2004
@@ -944,7 +944,7 @@
 
   /* Create sockfd and address */
   sockfd = gnet_private_create_listen_socket (SOCK_STREAM, iface, port, &sa);
-  if (sockfd < 0)
+  if ((int)sockfd < 0)
     return NULL;
   
   /* Set REUSEADDR so we can reuse the port */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]