Skip to content

Commit

Permalink
Removed some socket constants from arch=arm
Browse files Browse the repository at this point in the history
  • Loading branch information
berkowski authored and Susurrus committed Apr 9, 2017
1 parent 3354ffe commit 0db6ed1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/sys/socket/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ mod os {
pub const SO_LINGER: c_int = libc::SO_LINGER;
pub const SO_MARK: c_int = 36;
pub const SO_OOBINLINE: c_int = libc::SO_OOBINLINE;
#[cfg(not(target_arch="arm"))]
pub const SO_PASSCRED: c_int = libc::SO_PASSCRED;
pub const SO_PEEK_OFF: c_int = 42;
#[cfg(not(target_arch="arm"))]
pub const SO_PEERCRED: c_int = libc::SO_PEERCRED;
pub const SO_PRIORITY: c_int = 12;
pub const SO_PROTOCOL: c_int = 38;
Expand All @@ -55,6 +57,7 @@ mod os {
pub const SO_REUSEPORT: c_int = libc::SO_REUSEPORT;
pub const SO_RXQ_OVFL: c_int = 40;
pub const SO_SNDBUF: c_int = libc::SO_SNDBUF;
#[cfg(not(target_arch="arm"))]
pub const SO_SNDBUFFORCE: c_int = libc::SO_SNDBUFFORCE;
pub const SO_TIMESTAMP: c_int = 29;
pub const SO_TYPE: c_int = libc::SO_TYPE;
Expand Down
4 changes: 2 additions & 2 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ sockopt_impl!(Both, Broadcast, consts::SOL_SOCKET, consts::SO_BROADCAST, bool);
sockopt_impl!(Both, OobInline, consts::SOL_SOCKET, consts::SO_OOBINLINE, bool);
sockopt_impl!(GetOnly, SocketError, consts::SOL_SOCKET, consts::SO_ERROR, i32);
sockopt_impl!(Both, KeepAlive, consts::SOL_SOCKET, consts::SO_KEEPALIVE, bool);
#[cfg(target_os = "linux")]
#[cfg(all(target_os = "linux", not(target_arch="arm")))]
sockopt_impl!(GetOnly, PeerCredentials, consts::SOL_SOCKET, consts::SO_PEERCRED, super::ucred);
#[cfg(any(target_os = "macos",
target_os = "ios"))]
Expand All @@ -167,7 +167,7 @@ sockopt_impl!(Both, RcvBuf, consts::SOL_SOCKET, consts::SO_RCVBUF, usize);
sockopt_impl!(Both, SndBuf, consts::SOL_SOCKET, consts::SO_SNDBUF, usize);
#[cfg(target_os = "linux")]
sockopt_impl!(SetOnly, RcvBufForce, consts::SOL_SOCKET, consts::SO_RCVBUFFORCE, usize);
#[cfg(target_os = "linux")]
#[cfg(all(target_os = "linux", not(target_arch="arm")))]
sockopt_impl!(SetOnly, SndBufForce, consts::SOL_SOCKET, consts::SO_SNDBUFFORCE, usize);
sockopt_impl!(GetOnly, SockType, consts::SOL_SOCKET, consts::SO_TYPE, super::SockType);
#[cfg(any(target_os = "freebsd",
Expand Down

0 comments on commit 0db6ed1

Please sign in to comment.