From e952d309dfd57cf04cb9b461bd7f62d0537eaa3f Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 24 Nov 2023 12:06:47 -0500 Subject: [PATCH] l2_packet_haiku: Do not specify MSG_TRUNC flag. It doesn't have any meaning for recvfrom() in POSIX, but it does as a Linux extension. Haiku has never implemented it, and now returns errors when it is specified. The implementation of this same function in l2_packet_linux does not specify MSG_TRUNC, at least at present, so it's not needed. Will fix https://dev.haiku-os.org/ticket/18685 --- src/l2_packet/l2_packet_haiku.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/l2_packet/l2_packet_haiku.c b/src/l2_packet/l2_packet_haiku.c index c6d4d5fd5..392061d4e 100644 --- a/src/l2_packet/l2_packet_haiku.c +++ b/src/l2_packet/l2_packet_haiku.c @@ -127,7 +127,7 @@ static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) ssize_t bytesReceived; u8 buffer[2300]; - bytesReceived = recvfrom(l2->rx_fd, buffer, sizeof(buffer), MSG_TRUNC, + bytesReceived = recvfrom(l2->rx_fd, buffer, sizeof(buffer), 0, (struct sockaddr*)&from, &fromLength); if (bytesReceived <= 0)