[Orxonox-commit 2688] r7393 - code/branches/ipv6/src/external/enet

adrfried at orxonox.net adrfried at orxonox.net
Thu Sep 9 18:38:11 CEST 2010


Author: adrfried
Date: 2010-09-09 18:38:11 +0200 (Thu, 09 Sep 2010)
New Revision: 7393

Modified:
   code/branches/ipv6/src/external/enet/unix.c
Log:
also make unix.c C89 compatible

Modified: code/branches/ipv6/src/external/enet/unix.c
===================================================================
--- code/branches/ipv6/src/external/enet/unix.c	2010-09-09 16:00:00 UTC (rev 7392)
+++ code/branches/ipv6/src/external/enet/unix.c	2010-09-09 16:38:11 UTC (rev 7393)
@@ -98,7 +98,7 @@
     if (sin -> sa_family == AF_INET)
     {
         address -> host = enet_address_map4 ((((struct sockaddr_in *) sin) -> sin_addr.s_addr));
-        //address -> scopeID = 0;
+        /* address -> scopeID = 0; */
         address -> port = ENET_NET_TO_HOST_16 (((struct sockaddr_in *) sin) -> sin_port);
         return ENET_IPV4;
     }
@@ -199,7 +199,10 @@
     }
     else
     {
-        ENetAddress address_ = { ENET_HOST_ANY, 0, 0 };
+        ENetAddress address_;
+        address_.host = ENET_HOST_ANY;
+        address_.scopeID = 0;
+        address_.port = 0;
         enet_address_set_sin((struct sockaddr *) & sin, & address_, family);
     }
 
@@ -223,7 +226,7 @@
         int value = 1;
         setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, & value, sizeof (int));
     }
-#endif // IPV6_V6ONLY
+#endif /* IPV6_V6ONLY */
 
     return sock;
 }
@@ -404,7 +407,7 @@
     pollSocket[1].fd = socket6;
     pollSocket[0].events = 0;
     pollSocket[1].events = 0;
-    //pollSocket[0].revents = 0;
+    /* pollSocket[0].revents = 0; */
     pollSocket[1].revents = 0;
 
     if (pollSocket[0].fd == ENET_SOCKET_NULL)




More information about the Orxonox-commit mailing list