mirror of
https://github.com/Kiritow/GSock.git
synced 2024-03-22 13:10:51 +08:00
Fix compile error on Linux (clang and gcc)
This commit is contained in:
parent
8290d01644
commit
0ed154eeff
|
@ -425,7 +425,7 @@ int udpsock::sendto(const std::string& IPStr, int Port, const void* buffer, int
|
|||
int udpsock::recvfrom(std::string& fromIP, void* buffer, int bufferLength)
|
||||
{
|
||||
sockaddr_in saddr;
|
||||
int saddrlen = sizeof(saddr);
|
||||
socklen_t saddrlen = sizeof(saddr);
|
||||
int ret = ::recvfrom(_pp->sfd, (char*)buffer, bufferLength, 0, (sockaddr*)&saddr, &saddrlen);
|
||||
|
||||
if (ret < 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user