Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <875x3pjazp.fsf@alyssa.is>
Date: Thu, 11 Jun 2026 18:30:18 +0200
From: Alyssa Ross <hi@...ssa.is>
To: musl@...ts.openwall.com
Subject: Why do sendmmsg and recvmmsg take unsigned int flags?

sendmmsg and recvmmsg are declared in musl as follows:

int sendmmsg (int, struct mmsghdr *, unsigned int, unsigned int);
int recvmmsg (int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *);

Glibc declares the fourth parameter (flags) as int, as does FreeBSD.
The syscall definition in Linux is unsigned int, but I'd have expected
compatibility with other implementations to outweigh matching the
syscall.

Was this an intentional decision?  Should it stay this way?

(I encountered this due to a test that wraps libc's sendmmsg[1])

[1]: https://gitlab.freedesktop.org/libnice/libnice/-/blob/master/tests/instrument-send.c#L193-218

Download attachment "signature.asc" of type "application/pgp-signature" (228 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.