Skip to content

Commit 40670d5

Browse files
committed
Fix builds by moving some constants to linux/other/mod.rs to avoid breaking musl
1 parent f70a987 commit 40670d5

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,8 +1834,6 @@ pub const RTM_F_NOTIFY: ::c_uint = 0x100;
18341834
pub const RTM_F_CLONED: ::c_uint = 0x200;
18351835
pub const RTM_F_EQUALIZE: ::c_uint = 0x400;
18361836
pub const RTM_F_PREFIX: ::c_uint = 0x800;
1837-
pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
1838-
pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
18391837

18401838
pub const RTA_UNSPEC: ::c_ushort = 0;
18411839
pub const RTA_DST: ::c_ushort = 1;
@@ -1855,15 +1853,6 @@ pub const RTA_MP_ALGO: ::c_ushort = 14; // No longer used
18551853
pub const RTA_TABLE: ::c_ushort = 15;
18561854
pub const RTA_MARK: ::c_ushort = 16;
18571855
pub const RTA_MFC_STATS: ::c_ushort = 17;
1858-
pub const RTA_VIA: ::c_ushort = 18;
1859-
pub const RTA_NEWDST: ::c_ushort = 19;
1860-
pub const RTA_PREF: ::c_ushort = 20;
1861-
pub const RTA_ENCAP_TYPE: ::c_ushort = 21;
1862-
pub const RTA_ENCAP: ::c_ushort = 22;
1863-
pub const RTA_EXPIRES: ::c_ushort = 23;
1864-
pub const RTA_PAD: ::c_ushort = 24;
1865-
pub const RTA_UID: ::c_ushort = 25;
1866-
pub const RTA_TTL_PROPAGATE: ::c_ushort = 26;
18671856

18681857
pub const RTN_UNSPEC: ::c_uchar = 0;
18691858
pub const RTN_UNICAST: ::c_uchar = 1;

src/unix/notbsd/linux/other/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,20 @@ pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
601601
pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
602602
pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
603603

604+
// linux/rtnetlink.h
605+
pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
606+
pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
607+
608+
pub const RTA_VIA: ::c_ushort = 18;
609+
pub const RTA_NEWDST: ::c_ushort = 19;
610+
pub const RTA_PREF: ::c_ushort = 20;
611+
pub const RTA_ENCAP_TYPE: ::c_ushort = 21;
612+
pub const RTA_ENCAP: ::c_ushort = 22;
613+
pub const RTA_EXPIRES: ::c_ushort = 23;
614+
pub const RTA_PAD: ::c_ushort = 24;
615+
pub const RTA_UID: ::c_ushort = 25;
616+
pub const RTA_TTL_PROPAGATE: ::c_ushort = 26;
617+
604618
// linux/if_addr.h
605619
pub const IFA_FLAGS: ::c_ushort = 8;
606620

0 commit comments

Comments
 (0)