diff options
author | Bryant Mairs <bryant@mai.rs> | 2017-08-16 13:02:51 -0700 |
---|---|---|
committer | Bryant Mairs <bryant@mai.rs> | 2017-08-16 19:37:45 -0700 |
commit | 4e2bf093c9effe08fe4a226604a7e77cdafb7fd8 (patch) | |
tree | e1d44eb0f22acddb74049224cb0848b0cb56bceb | |
parent | 15e682ccbbc499af15b44d28d126576c61ae75bb (diff) | |
download | nix-4e2bf093c9effe08fe4a226604a7e77cdafb7fd8.zip |
Remove ugly libc_bitflags hack for mac/ios.
-rw-r--r-- | src/fcntl.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs index 9501135f..e42c923e 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -20,7 +20,6 @@ mod ffi { pub const F_GET_SEALS: c_int = 1034; } -#[cfg(not(any(target_os = "ios", target_os = "macos")))] libc_bitflags!{ pub struct AtFlags: c_int { AT_SYMLINK_NOFOLLOW; @@ -31,14 +30,6 @@ libc_bitflags!{ } } -#[cfg(any(target_os = "ios", target_os = "macos"))] -bitflags!( - pub struct AtFlags: c_int { - // hack because bitflags require one entry - const EMPTY = 0x0; - } -); - pub fn open<P: ?Sized + NixPath>(path: &P, oflag: OFlag, mode: Mode) -> Result<RawFd> { let fd = try!(path.with_nix_path(|cstr| { unsafe { libc::open(cstr.as_ptr(), oflag.bits(), mode.bits() as c_uint) } |