Skip to content

Commit

Permalink
chore: resolve type mismatch for windows libs
Browse files Browse the repository at this point in the history
  • Loading branch information
darshankabariya committed Oct 23, 2024
1 parent b55145e commit cd40df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miniupnpc/src/connecthostport.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ SOCKET connecthostport(const char * host, unsigned short port,
/* setting a 3 seconds timeout for the connect() call */
timeout.tv_sec = 3;
timeout.tv_usec = 0;
if(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(struct timeval)) < 0)
if(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout, sizeof(struct timeval)) < 0)
{
PRINT_SOCKET_ERROR("setsockopt");
}
timeout.tv_sec = 3;
timeout.tv_usec = 0;
if(setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(struct timeval)) < 0)
if(setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout, sizeof(struct timeval)) < 0)
{
PRINT_SOCKET_ERROR("setsockopt");
}
Expand Down

0 comments on commit cd40df4

Please sign in to comment.