Skip to content

Commit 022b324

Browse files
operutkaJohnTitor
authored andcommitted
Fix constants accidentally removed for Linux uClibc targets
The constants were removed by commit 2fe1d91 for uClibc in all operating systems. However, the commit was supposed to fix things for L4Re, not break things for other operating systems. So this commit limits the uClibc exclusions introduced in 2fe1d91 to apply only if the target OS is L4Re.
1 parent fe7f7b4 commit 022b324

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/unix/linux_like/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -805,11 +805,11 @@ pub const IP_TRANSPARENT: c_int = 19;
805805
pub const IP_ORIGDSTADDR: c_int = 20;
806806
pub const IP_RECVORIGDSTADDR: c_int = IP_ORIGDSTADDR;
807807
pub const IP_MINTTL: c_int = 21;
808-
#[cfg(not(target_env = "uclibc"))]
808+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
809809
pub const IP_NODEFRAG: c_int = 22;
810-
#[cfg(not(target_env = "uclibc"))]
810+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
811811
pub const IP_CHECKSUM: c_int = 23;
812-
#[cfg(not(target_env = "uclibc"))]
812+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
813813
pub const IP_BIND_ADDRESS_NO_PORT: c_int = 24;
814814
pub const IP_MULTICAST_IF: c_int = 32;
815815
pub const IP_MULTICAST_TTL: c_int = 33;
@@ -831,9 +831,9 @@ pub const IP_PMTUDISC_DONT: c_int = 0;
831831
pub const IP_PMTUDISC_WANT: c_int = 1;
832832
pub const IP_PMTUDISC_DO: c_int = 2;
833833
pub const IP_PMTUDISC_PROBE: c_int = 3;
834-
#[cfg(not(target_env = "uclibc"))]
834+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
835835
pub const IP_PMTUDISC_INTERFACE: c_int = 4;
836-
#[cfg(not(target_env = "uclibc"))]
836+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
837837
pub const IP_PMTUDISC_OMIT: c_int = 5;
838838

839839
// IPPROTO_IP defined in src/unix/mod.rs
@@ -943,16 +943,16 @@ pub const IPV6_RECVRTHDR: c_int = 56;
943943
pub const IPV6_RTHDR: c_int = 57;
944944
pub const IPV6_RECVDSTOPTS: c_int = 58;
945945
pub const IPV6_DSTOPTS: c_int = 59;
946-
#[cfg(not(target_env = "uclibc"))]
946+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
947947
pub const IPV6_RECVPATHMTU: c_int = 60;
948-
#[cfg(not(target_env = "uclibc"))]
948+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
949949
pub const IPV6_PATHMTU: c_int = 61;
950-
#[cfg(not(target_env = "uclibc"))]
950+
#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))]
951951
pub const IPV6_DONTFRAG: c_int = 62;
952952
pub const IPV6_RECVTCLASS: c_int = 66;
953953
pub const IPV6_TCLASS: c_int = 67;
954954
cfg_if! {
955-
if #[cfg(not(target_env = "uclibc"))] {
955+
if #[cfg(not(all(target_os = "l4re", target_env = "uclibc")))] {
956956
pub const IPV6_AUTOFLOWLABEL: c_int = 70;
957957
pub const IPV6_ADDR_PREFERENCES: c_int = 72;
958958
pub const IPV6_MINHOPCOUNT: c_int = 73;
@@ -1220,7 +1220,7 @@ pub const __WALL: c_int = 0x40000000;
12201220
pub const __WCLONE: c_int = 0x80000000;
12211221

12221222
cfg_if! {
1223-
if #[cfg(not(target_env = "uclibc"))] {
1223+
if #[cfg(not(all(target_os = "l4re", target_env = "uclibc")))] {
12241224
pub const SPLICE_F_MOVE: c_uint = 0x01;
12251225
pub const SPLICE_F_NONBLOCK: c_uint = 0x02;
12261226
pub const SPLICE_F_MORE: c_uint = 0x04;

0 commit comments

Comments
 (0)