Skip to content

Commit 126cca2

Browse files
committed
WIP: add socket constants already present in libc
1 parent a29c9d7 commit 126cca2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/sys/socket/sockopt.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,11 @@ sockopt_impl!(Both, TcpKeepAlive, libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, u32);
166166
sockopt_impl!(Both, TcpKeepIdle, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, u32);
167167
sockopt_impl!(Both, RcvBuf, libc::SOL_SOCKET, libc::SO_RCVBUF, usize);
168168
sockopt_impl!(Both, SndBuf, libc::SOL_SOCKET, libc::SO_SNDBUF, usize);
169-
#[cfg(target_os = "linux")]
169+
#[cfg(any(target_os = "linux", target_os = "android"))]
170170
sockopt_impl!(SetOnly, RcvBufForce, libc::SOL_SOCKET, libc::SO_RCVBUFFORCE, usize);
171-
#[cfg(all(target_os = "linux", not(target_arch="arm")))]
171+
#[cfg(any(target_os = "linux", target_os = "android"))]
172172
sockopt_impl!(SetOnly, SndBufForce, libc::SOL_SOCKET, libc::SO_SNDBUFFORCE, usize);
173173
sockopt_impl!(GetOnly, SockType, libc::SOL_SOCKET, libc::SO_TYPE, super::SockType);
174-
#[cfg(any(target_os = "freebsd",
175-
target_os = "linux",
176-
target_os = "nacl"))]
177174
sockopt_impl!(GetOnly, AcceptConn, libc::SOL_SOCKET, libc::SO_ACCEPTCONN, bool);
178175
#[cfg(any(target_os = "linux", target_os = "android"))]
179176
sockopt_impl!(GetOnly, OriginalDst, libc::SOL_IP, libc::SO_ORIGINAL_DST, sockaddr_in);

0 commit comments

Comments
 (0)