fix windows compile error with UdpSocket::recvfrom
This commit is contained in:
parent
93cb898989
commit
f075f586e1
@ -115,7 +115,11 @@ namespace ix
|
|||||||
|
|
||||||
ssize_t UdpSocket::recvfrom(char* buffer, size_t length)
|
ssize_t UdpSocket::recvfrom(char* buffer, size_t length)
|
||||||
{
|
{
|
||||||
uint32_t addressLen = sizeof(_server);
|
#ifdef _WIN32
|
||||||
|
int addressLen = (int) sizeof(_server);
|
||||||
|
#else
|
||||||
|
socklen_t addressLen = (socklen_t) sizeof(_server);
|
||||||
|
#endif
|
||||||
return (ssize_t)::recvfrom(
|
return (ssize_t)::recvfrom(
|
||||||
_sockfd, buffer, length, 0, (struct sockaddr*) &_server, &addressLen);
|
_sockfd, buffer, length, 0, (struct sockaddr*) &_server, &addressLen);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user