summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-10-10 07:39:26 -0700
committerGitHub <noreply@github.com>2016-10-10 07:39:26 -0700
commit56b270454f2627d8f1694910124ef4a9144d82ee (patch)
treeb47207b2e9aa5a09d302be2d952701c0dc193068
parentf3acbba63318f491abec76789fcd509ca175ab61 (diff)
parentc52458c38c105be3faded21e8fcda03da685201d (diff)
downloadrust-libc-56b270454f2627d8f1694910124ef4a9144d82ee.tar.gz
Auto merge of #424 - mmatyas:android_afnetlink, r=alexcrichton
Make the AF_NETLINK constant available for Android Currently the `AF_NETLINK` constant is not available for Android, but [it has the same value as on Linux](https://android.googlesource.com/kernel/common/+/android-4.4.y/include/linux/socket.h#177). To fix it, this patch moves the definition to the common `notbsd/mod.rs`. (this fixes an [issue we found in Servo](https://github.com/servo/servo/issues/13154#issuecomment-251325701))
-rw-r--r--src/unix/notbsd/linux/mod.rs2
-rw-r--r--src/unix/notbsd/mod.rs1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 6d08b56262..ea820ea5c6 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -506,8 +506,6 @@ pub const EFD_SEMAPHORE: ::c_int = 0x1;
pub const NCCS: usize = 32;
-pub const AF_NETLINK: ::c_int = 16;
-
pub const LOG_NFACILITIES: ::c_int = 24;
pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs
index 2558ca1496..a53211a2b8 100644
--- a/src/unix/notbsd/mod.rs
+++ b/src/unix/notbsd/mod.rs
@@ -435,6 +435,7 @@ pub const IFF_DYNAMIC: ::c_int = 0x8000;
pub const AF_UNIX: ::c_int = 1;
pub const AF_INET: ::c_int = 2;
pub const AF_INET6: ::c_int = 10;
+pub const AF_NETLINK: ::c_int = 16;
pub const SOCK_RAW: ::c_int = 3;
pub const IPPROTO_TCP: ::c_int = 6;
pub const IPPROTO_IP: ::c_int = 0;