CV 2014-06-16: Call WSASetLastError *after* setsockopt since,
apparently, setsockopt sets the last WSA error code to 0 on
success. */
- setsockopt (get_socket (), SOL_SOCKET, SO_ERROR,
- (const char *) &wsa_err, sizeof wsa_err);
+ ::setsockopt (get_socket (), SOL_SOCKET, SO_ERROR,
+ (const char *) &wsa_err, sizeof wsa_err);
WSASetLastError (wsa_err);
ret = SOCKET_ERROR;
}
}
else
{
- closesocket (res);
+ ::closesocket (res);
res = -1;
}
}
int res = 0;
release_events ();
- while ((res = closesocket (get_socket ())) != 0)
+ while ((res = ::closesocket (get_socket ())) != 0)
{
if (WSAGetLastError () != WSAEWOULDBLOCK)
{
case _IOR('f', 127, u_long):
#endif
/* Make sure to use the Winsock definition of FIONREAD. */
- res = ioctlsocket (get_socket (), _IOR('f', 127, u_long), (u_long *) p);
+ res = ::ioctlsocket (get_socket (), _IOR('f', 127, u_long), (u_long *) p);
if (res == SOCKET_ERROR)
set_winsock_errno ();
break;
res = 0;
}
else
- res = ioctlsocket (get_socket (), cmd, (u_long *) p);
+ res = ::ioctlsocket (get_socket (), cmd, (u_long *) p);
break;
}
syscall_printf ("%d = ioctl_socket(%x, %p)", res, cmd, p);