mirror of
https://github.com/rust-lang/rust
synced 2024-09-21 09:22:41 +00:00
Rollup merge of #125998 - devnexen:get_mode_illumos, r=Nilstrieb
std::unix::fs::get_mode implementation for illumos/solaris. they both support the F_GETFL fctnl flag/O_ACCMODE mask to get the file descriptor access modes.
This commit is contained in:
commit
ba31a0a920
|
@ -1561,6 +1561,8 @@ fn get_path(_fd: c_int) -> Option<PathBuf> {
|
|||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "vxworks",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
fn get_mode(fd: c_int) -> Option<(bool, bool)> {
|
||||
|
@ -1583,6 +1585,8 @@ fn get_mode(fd: c_int) -> Option<(bool, bool)> {
|
|||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "vxworks",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
)))]
|
||||
fn get_mode(_fd: c_int) -> Option<(bool, bool)> {
|
||||
|
|
Loading…
Reference in a new issue