Skip to content

Commit

Permalink
Add O_SEARCH to all platforms supported by libc crate (#2374)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
TheJonny and SteveLauC authored Apr 21, 2024
1 parent 6555ab4 commit 7ffbd3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/2374.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `open` flag `O_SEARCH` to AIX, Empscripten, FreeBSD, Fuchsia, solarish, WASI
5 changes: 3 additions & 2 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))]
Expand Down

0 comments on commit 7ffbd3c

Please sign in to comment.