* 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-06 Collin Funk <collin.funk1@gmail.com>
servent tests: Fix failure on 32-bit native Windows.
# 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