Skip to content

Commit 4588d4c

Browse files
committed
Remove libc_bitflags hacks.
1 parent b866e36 commit 4588d4c

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

src/fcntl.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ mod ffi {
2020
pub const F_GET_SEALS: c_int = 1034;
2121
}
2222

23-
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
2423
libc_bitflags!{
2524
pub struct AtFlags: c_int {
2625
AT_SYMLINK_NOFOLLOW;
@@ -31,14 +30,6 @@ libc_bitflags!{
3130
}
3231
}
3332

34-
#[cfg(any(target_os = "ios", target_os = "macos"))]
35-
bitflags!(
36-
pub struct AtFlags: c_int {
37-
// hack because bitflags require one entry
38-
const EMPTY = 0x0;
39-
}
40-
);
41-
4233
pub fn open<P: ?Sized + NixPath>(path: &P, oflag: OFlag, mode: Mode) -> Result<RawFd> {
4334
let fd = try!(path.with_nix_path(|cstr| {
4435
unsafe { libc::open(cstr.as_ptr(), oflag.bits(), mode.bits() as c_uint) }

src/sys/socket/mod.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ pub enum SockProtocol {
9090
KextControl = libc::SYSPROTO_CONTROL,
9191
}
9292

93-
// FIXME: Replace these two separate declarations with one once https://github.com/rust-lang-nursery/bitflags/issues/113
94-
// is resolved.
95-
#[cfg(not(any(target_os = "mac", target_os = "ios")))]
9693
libc_bitflags!{
9794
/// Additional socket options
9895
pub struct SockFlag: c_int {
@@ -122,15 +119,6 @@ libc_bitflags!{
122119
}
123120
}
124121

125-
#[cfg(any(target_os = "mac", target_os = "ios"))]
126-
bitflags!{
127-
/// Additional socket options
128-
pub struct SockFlag: c_int {
129-
/// Empty placeholder
130-
const EMPTY = 0;
131-
}
132-
}
133-
134122
libc_bitflags!{
135123
/// Flags for send/recv and their relatives
136124
pub struct MsgFlags: libc::c_int {

0 commit comments

Comments
 (0)