]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
socklen_t is missing on windows... use size_t there, I hope this is right (winxp64...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 9 Sep 2004 19:20:30 +0000 (19:20 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 9 Sep 2004 19:20:30 +0000 (19:20 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4464 d7cf8633-e32d-0410-b094-e92efae38249

lhnet.c

diff --git a/lhnet.c b/lhnet.c
index bc7f40172171069cc55c9275529ea1548e9b488a..259928e718dc6b8d085ccd5b720aff9f6a3e92c9 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -459,7 +459,12 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address)
                                        if (ioctl(lhnetsocket->inetsocket, FIONBIO, &_true) != -1)
 #endif
                                        {
-                                               socklen_t namelen = address->addresstype == LHNETADDRESSTYPE_INET6 ? sizeof(lhnetsocket->address.addressdata.inet6) : sizeof(lhnetsocket->address.addressdata.inet4);
+#ifdef WIN32
+                                               size_t namelen;
+#else
+                                               socklen_t namelen;
+#endif
+                                               namelen = address->addresstype == LHNETADDRESSTYPE_INET6 ? sizeof(lhnetsocket->address.addressdata.inet6) : sizeof(lhnetsocket->address.addressdata.inet4);
                                                if (bind(lhnetsocket->inetsocket, (void *)&lhnetsocket->address.addressdata, namelen) != -1)
                                                {
                                                        getsockname(lhnetsocket->inetsocket, (void *)&lhnetsocket->address.addressdata, &namelen);