From f3c500fe477e39d81d15fcaf68f498be43433b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 12 Jan 2015 19:02:15 +0100 Subject: [PATCH] Fix bug on OS X (BSD?) in net_accept() for UDP --- library/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/net.c b/library/net.c index 9d0266119f..b9fe68d431 100644 --- a/library/net.c +++ b/library/net.c @@ -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 */ 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 ); }