fcntl-h, etc.: prefer O_SEARCH to O_RDONLY when applicable
[gnulib.git] / lib / fcntl.in.h
index 8fb7852..42fb81b 100644 (file)
@@ -210,6 +210,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
 # define O_RSYNC 0
 #endif
 
+#ifndef O_SEARCH
+# define O_SEARCH O_RDONLY /* This is often close enough in older systems.  */
+#endif
+
 #ifndef O_SYNC
 # define O_SYNC 0
 #endif