sys/mount.h vs fcntl.h
Florian Weimer
fweimer@redhat.com
Tue Jan 27 08:24:11 GMT 2026
* DJ Delorie:
> commit a36999aed5cd36d54a828ab4b41426aef7d870f2
> Author: DJ Delorie <dj@redhat.com>
> Date: Mon Jan 26 22:24:42 2026 -0500
>
> 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 (a private version) separately.
To make bits/cloexec.h an installed hedader, you need to update
sysdeps_headers in sysdeps/unix/sysv/linux/Makefile.
Thanks,
Florian
More information about the Libc-alpha
mailing list