git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4464
d7cf8633-e32d-0410-b094-
e92efae38249
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);