Skip to content

Commit

Permalink
l2_packet_haiku: Do not specify MSG_TRUNC flag.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
waddlesplash committed Nov 24, 2023
1 parent 9120a91 commit e952d30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/l2_packet/l2_packet_haiku.c
Expand Up @@ -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)
Expand Down

0 comments on commit e952d30

Please sign in to comment.