Skip to content

Commit 7ffbd3c

Browse files
TheJonnySteveLauC
andauthored
Add O_SEARCH to all platforms supported by libc crate (#2374)
* add solarish and freebsd to O_SEARCH, as it exists in in the libc crate * fcntl/O_SEARCH: add description similiar to the posix manpage * fcntl O_SEARCH oops - fix syntax * fcntl O_SEARCH: add fuchsia * O_SEARCH: changelog * fcntl/OPath: no alias for single platform Co-authored-by: SteveLauC <[email protected]> * O_SEARCH: also add aux, wasi, emscripten * O_SEARCH: updated added platforms in changelog --------- Co-authored-by: SteveLauC <[email protected]>
1 parent 6555ab4 commit 7ffbd3c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

changelog/2374.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add `open` flag `O_SEARCH` to AIX, Empscripten, FreeBSD, Fuchsia, solarish, WASI

src/fcntl.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ libc_bitflags!(
164164
/// Similar to `O_DSYNC` but applies to `read`s instead.
165165
#[cfg(any(target_os = "linux", netbsdlike))]
166166
O_RSYNC;
167-
/// Skip search permission checks.
168-
#[cfg(target_os = "netbsd")]
167+
/// Open directory for search only. Skip search permission checks on
168+
/// later `openat()` calls using the obtained file descriptor.
169+
#[cfg(any(target_os = "netbsd", target_os = "freebsd", solarish, target_os = "fuchsia", target_os = "emscripten", target_os = "aix", target_os = "wasi"))]
169170
O_SEARCH;
170171
/// Open with a shared file lock.
171172
#[cfg(any(bsd, target_os = "redox"))]

0 commit comments

Comments
 (0)