[patch v1] include: isolate __O_CLOEXEC flag for sys/mount.h and fcntl.h
Florian Weimer
fweimer@redhat.com
Wed Feb 11 08:58:07 GMT 2026
* Adhemerval Zanella Netto:
> On 07/02/26 02:19, DJ Delorie wrote:
>>
>> include: isolate __O_CLOEXEC flag for sys/mount.h and fcntl.h
>>
>> Including sys/mount.h should not implicitly include fcntl.h
>> as that causes namespace pollution and conflicts with kernel
>> headers. It only needs O_CLOEXEC for OPEN_TREE_CLOEXEC
>> (although it shouldn't need that, but it's defined that way)
>> so we provide that define (via a private version) separately.
>
> Look ok to me, although I haven't rebuild all the ABIs to check if this
> break anything.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
I ran build-many-glibcs.py with the patch, no issues reported.
Tested-by: Florian Weimer <fweimer@redhat.com>
Thanks,
Florian
More information about the Libc-alpha
mailing list