* lib/fcntl.in.h (O_SEARCH): Redefine to O_RDONLY on musl,
which mistakenly defines it to be O_PATH on GNU/Linux.
Problem reported by Lasse Collin in:
https://bugs.gnu.org/75405
+2025-01-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ fcntl-h: port better to musl on GNU/Linux
+ * lib/fcntl.in.h (O_SEARCH): Redefine to O_RDONLY on musl,
+ which mistakenly defines it to be O_PATH on GNU/Linux.
+ Problem reported by Lasse Collin in:
+ https://bugs.gnu.org/75405
+
2025-01-05 Bruno Haible <bruno@clisp.org>
sigsegv tests: Work around a longjmp bug on GNU/Hurd.
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
# define O_RSYNC 0
#endif
+#if defined O_SEARCH && defined O_PATH && O_SEARCH == O_PATH
+# undef O_SEARCH /* musl mistakenly #defines O_SEARCH to O_PATH. */
+#endif
+
#ifndef O_SEARCH
-# define O_SEARCH O_RDONLY /* This is often close enough in older systems. */
+# define O_SEARCH O_RDONLY /* Often close enough in non-POSIX systems. */
#endif
#ifndef O_SYNC