summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Baublitz <john.m.baublitz@gmail.com>2019-05-21 16:29:41 -0400
committerJohn Baublitz <john.m.baublitz@gmail.com>2019-05-21 16:29:41 -0400
commit40670d5fddcf1a1be507f8ebb3afcd22a0252c4b (patch)
treef8a89590d16c546c7e7515e3e5cf26edfcbe046a /src
parentf70a98773c5dfd6bc68156022fcd32535a8d9b2a (diff)
downloadrust-libc-40670d5fddcf1a1be507f8ebb3afcd22a0252c4b.tar.gz
Fix builds by moving some constants to linux/other/mod.rs to avoid breaking musl
Diffstat (limited to 'src')
-rw-r--r--src/unix/notbsd/linux/mod.rs11
-rw-r--r--src/unix/notbsd/linux/other/mod.rs14
2 files changed, 14 insertions, 11 deletions
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 266e548cb4..a2d48f32c8 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1834,8 +1834,6 @@ pub const RTM_F_NOTIFY: ::c_uint = 0x100;
pub const RTM_F_CLONED: ::c_uint = 0x200;
pub const RTM_F_EQUALIZE: ::c_uint = 0x400;
pub const RTM_F_PREFIX: ::c_uint = 0x800;
-pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
-pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
pub const RTA_UNSPEC: ::c_ushort = 0;
pub const RTA_DST: ::c_ushort = 1;
@@ -1855,15 +1853,6 @@ pub const RTA_MP_ALGO: ::c_ushort = 14; // No longer used
pub const RTA_TABLE: ::c_ushort = 15;
pub const RTA_MARK: ::c_ushort = 16;
pub const RTA_MFC_STATS: ::c_ushort = 17;
-pub const RTA_VIA: ::c_ushort = 18;
-pub const RTA_NEWDST: ::c_ushort = 19;
-pub const RTA_PREF: ::c_ushort = 20;
-pub const RTA_ENCAP_TYPE: ::c_ushort = 21;
-pub const RTA_ENCAP: ::c_ushort = 22;
-pub const RTA_EXPIRES: ::c_ushort = 23;
-pub const RTA_PAD: ::c_ushort = 24;
-pub const RTA_UID: ::c_ushort = 25;
-pub const RTA_TTL_PROPAGATE: ::c_ushort = 26;
pub const RTN_UNSPEC: ::c_uchar = 0;
pub const RTN_UNICAST: ::c_uchar = 1;
diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs
index 524ec6f137..91b610d1a0 100644
--- a/src/unix/notbsd/linux/other/mod.rs
+++ b/src/unix/notbsd/linux/other/mod.rs
@@ -601,6 +601,20 @@ pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
+// linux/rtnetlink.h
+pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
+pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
+
+pub const RTA_VIA: ::c_ushort = 18;
+pub const RTA_NEWDST: ::c_ushort = 19;
+pub const RTA_PREF: ::c_ushort = 20;
+pub const RTA_ENCAP_TYPE: ::c_ushort = 21;
+pub const RTA_ENCAP: ::c_ushort = 22;
+pub const RTA_EXPIRES: ::c_ushort = 23;
+pub const RTA_PAD: ::c_ushort = 24;
+pub const RTA_UID: ::c_ushort = 25;
+pub const RTA_TTL_PROPAGATE: ::c_ushort = 26;
+
// linux/if_addr.h
pub const IFA_FLAGS: ::c_ushort = 8;