mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-06 07:10:41 +00:00
Fix bug on OS X (BSD?) in net_accept() for UDP
This commit is contained in:
parent
a65d5082b6
commit
f3c500fe47
@ -464,7 +464,7 @@ int net_accept( int bind_fd, int *client_fd, void *client_ip )
|
|||||||
/* UDP: wait for a message, but keep it in the queue */
|
/* UDP: wait for a message, but keep it in the queue */
|
||||||
char buf[1] = { 0 };
|
char buf[1] = { 0 };
|
||||||
|
|
||||||
ret = recvfrom( bind_fd, buf, 0, MSG_PEEK,
|
ret = recvfrom( bind_fd, buf, sizeof( buf ), MSG_PEEK,
|
||||||
(struct sockaddr *) &client_addr, &n );
|
(struct sockaddr *) &client_addr, &n );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user