From 45f61d4759398672978a8eb9716603f66fd7b1ce Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 9 Sep 2004 19:20:30 +0000 Subject: [PATCH] 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 --- lhnet.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- 2.39.2