[PATCH] unistd: use __USE_XOPEN2K24 for existing POSIX.1-2024 interfaces

Cristian Rodriguez yo@cristianrodriguez.net
Sat Feb 21 11:46:51 GMT 2026


> (getentropy): Also define when __USE_XOPEN2K24 is defined.

But the getentropy function does not comply with POSIX.1-2024.yet.
it sets errno like the original openBSD interface, POSIX says it has
to be EINVAL.
It also introduces GETENTROPY_MAX, which it says has a minimum value of 256..
In the Linux kernel implementation it is pagesize() reads , not 256..
in order to provide a constant value glibc could just use 4096 across
all architectures.
It also does not behave like the BSDs, which aborts the program on any
error other than:
[EINVAL]The value of length is greater than {GETENTROPY_MAX}..


More information about the Libc-alpha mailing list