From f129095ac6e76505cfa6711cc78e2b5f4430070e Mon Sep 17 00:00:00 2001 From: SteveLauC Date: Mon, 22 Apr 2024 09:45:18 +0800 Subject: [PATCH] feat: OFlag::O_PATH for FreeBSD and Fuchsia (#2382) --- changelog/2382.added.md | 1 + src/fcntl.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/2382.added.md diff --git a/changelog/2382.added.md b/changelog/2382.added.md new file mode 100644 index 0000000000..d9b2274157 --- /dev/null +++ b/changelog/2382.added.md @@ -0,0 +1 @@ +Add `fcntl::OFlag::O_PATH` for FreeBSD and Fuchsia diff --git a/src/fcntl.rs b/src/fcntl.rs index a33b2642d3..67204a7272 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -151,7 +151,7 @@ libc_bitflags!( /// Obtain a file descriptor for low-level access. /// /// The file itself is not opened and other file operations will fail. - #[cfg(any(linux_android, target_os = "redox"))] + #[cfg(any(linux_android, target_os = "redox", target_os = "freebsd", target_os = "fuchsia"))] O_PATH; /// Only allow reading. ///