Skip to content

Commit 0db6ed1

Browse files
berkowskiSusurrus
authored andcommitted
Removed some socket constants from arch=arm
1 parent 3354ffe commit 0db6ed1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/sys/socket/consts.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ mod os {
4040
pub const SO_LINGER: c_int = libc::SO_LINGER;
4141
pub const SO_MARK: c_int = 36;
4242
pub const SO_OOBINLINE: c_int = libc::SO_OOBINLINE;
43+
#[cfg(not(target_arch="arm"))]
4344
pub const SO_PASSCRED: c_int = libc::SO_PASSCRED;
4445
pub const SO_PEEK_OFF: c_int = 42;
46+
#[cfg(not(target_arch="arm"))]
4547
pub const SO_PEERCRED: c_int = libc::SO_PEERCRED;
4648
pub const SO_PRIORITY: c_int = 12;
4749
pub const SO_PROTOCOL: c_int = 38;
@@ -55,6 +57,7 @@ mod os {
5557
pub const SO_REUSEPORT: c_int = libc::SO_REUSEPORT;
5658
pub const SO_RXQ_OVFL: c_int = 40;
5759
pub const SO_SNDBUF: c_int = libc::SO_SNDBUF;
60+
#[cfg(not(target_arch="arm"))]
5861
pub const SO_SNDBUFFORCE: c_int = libc::SO_SNDBUFFORCE;
5962
pub const SO_TIMESTAMP: c_int = 29;
6063
pub const SO_TYPE: c_int = libc::SO_TYPE;

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ sockopt_impl!(Both, Broadcast, consts::SOL_SOCKET, consts::SO_BROADCAST, bool);
152152
sockopt_impl!(Both, OobInline, consts::SOL_SOCKET, consts::SO_OOBINLINE, bool);
153153
sockopt_impl!(GetOnly, SocketError, consts::SOL_SOCKET, consts::SO_ERROR, i32);
154154
sockopt_impl!(Both, KeepAlive, consts::SOL_SOCKET, consts::SO_KEEPALIVE, bool);
155-
#[cfg(target_os = "linux")]
155+
#[cfg(all(target_os = "linux", not(target_arch="arm")))]
156156
sockopt_impl!(GetOnly, PeerCredentials, consts::SOL_SOCKET, consts::SO_PEERCRED, super::ucred);
157157
#[cfg(any(target_os = "macos",
158158
target_os = "ios"))]
@@ -167,7 +167,7 @@ sockopt_impl!(Both, RcvBuf, consts::SOL_SOCKET, consts::SO_RCVBUF, usize);
167167
sockopt_impl!(Both, SndBuf, consts::SOL_SOCKET, consts::SO_SNDBUF, usize);
168168
#[cfg(target_os = "linux")]
169169
sockopt_impl!(SetOnly, RcvBufForce, consts::SOL_SOCKET, consts::SO_RCVBUFFORCE, usize);
170-
#[cfg(target_os = "linux")]
170+
#[cfg(all(target_os = "linux", not(target_arch="arm")))]
171171
sockopt_impl!(SetOnly, SndBufForce, consts::SOL_SOCKET, consts::SO_SNDBUFFORCE, usize);
172172
sockopt_impl!(GetOnly, SockType, consts::SOL_SOCKET, consts::SO_TYPE, super::SockType);
173173
#[cfg(any(target_os = "freebsd",

0 commit comments

Comments
 (0)