Saw this on the musl mailing list. We also seem to have `unsigned int flags` since day one. Note that `flags` is the same as in send/recv &co, where it's `int flags`. Should we fix this? -uwe
--- Begin Message ---
- To: musl%lists.openwall.com@localhost
- Subject: Why do sendmmsg and recvmmsg take unsigned int flags?
- From: Alyssa Ross <hi%alyssa.is@localhost>
- Date: Thu, 11 Jun 2026 18:30:18 +0200
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-218Attachment: signature.asc
Description: PGP signature
--- End Message ---