diff --git a/changelog/2374.added.md b/changelog/2374.added.md new file mode 100644 index 0000000000..ed0ed25675 --- /dev/null +++ b/changelog/2374.added.md @@ -0,0 +1 @@ +Add `open` flag `O_SEARCH` to AIX, Empscripten, FreeBSD, Fuchsia, solarish, WASI diff --git a/src/fcntl.rs b/src/fcntl.rs index 16af6e6d86..a33b2642d3 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -164,8 +164,9 @@ libc_bitflags!( /// Similar to `O_DSYNC` but applies to `read`s instead. #[cfg(any(target_os = "linux", netbsdlike))] O_RSYNC; - /// Skip search permission checks. - #[cfg(target_os = "netbsd")] + /// Open directory for search only. Skip search permission checks on + /// later `openat()` calls using the obtained file descriptor. + #[cfg(any(target_os = "netbsd", target_os = "freebsd", solarish, target_os = "fuchsia", target_os = "emscripten", target_os = "aix", target_os = "wasi"))] O_SEARCH; /// Open with a shared file lock. #[cfg(any(bsd, target_os = "redox"))]