From 613e9b383fdaf75bbae16cb5ae66da5c9d3247a3 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 8 Jan 2025 10:32:56 +0100 Subject: [PATCH] doc: Document the previous change. * doc/posix-headers/fcntl.texi: Document O_SEARCH musl workaround. --- ChangeLog | 5 +++++ doc/posix-headers/fcntl.texi | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39e35c04a7..b7c964d776 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-01-08 Bruno Haible + + doc: Document the previous change. + * doc/posix-headers/fcntl.texi: Document O_SEARCH musl workaround. + 2025-01-08 Paul Eggert fcntl-h: port better to musl on GNU/Linux diff --git a/doc/posix-headers/fcntl.texi b/doc/posix-headers/fcntl.texi index 246cc0a881..6f85ca663a 100644 --- a/doc/posix-headers/fcntl.texi +++ b/doc/posix-headers/fcntl.texi @@ -56,12 +56,10 @@ glibc 2.40, macOS 12, FreeBSD 12.4, NetBSD 6.1, OpenBSD 7.5, AIX 6.1, HP-UX 11, When not otherwise defined, Gnulib defines this macro to @samp{O_RDONLY}, which is typically 0. -Note: @samp{O_SEARCH} is not suitable for opening a file descriptor -that you want to use with @code{fchmod} later, because -musl libc defines @samp{O_EXEC} to @code{O_PATH} and -@c https://lists.gnu.org/archive/html/bug-gnulib/2012-11/msg00029.html -Linux @code{fchmod} fails with error @code{EBADF} when given such a file -descriptor. +@item +@samp{O_SEARCH} is defined to @code{O_PATH} on some platforms: +@c https://bugs.gnu.org/75405 +musl libc. @item @samp{O_ACCMODE} is not defined on some platforms: -- 2.39.5