From: havoc Date: Thu, 9 Sep 2004 19:20:30 +0000 (+0000) Subject: socklen_t is missing on windows... use size_t there, I hope this is right (winxp64... X-Git-Tag: xonotic-v0.1.0preview~5628 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;ds=sidebyside;h=45f61d4759398672978a8eb9716603f66fd7b1ce;p=xonotic%2Fdarkplaces.git socklen_t is missing on windows... use size_t there, I hope this is right (winxp64 testing needed) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4464 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/lhnet.c b/lhnet.c index bc7f4017..259928e7 100644 --- 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);