summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-05 02:29:10 +0000
committerbors <bors@rust-lang.org>2018-07-05 02:29:10 +0000
commit4dd66657b70561637afa75f90ff4a341527b264f (patch)
tree4039f23a27b8460e2555d59dd5d38a6c3b47f98b
parent8a9b980a8402fde4c7dec14050ec75d742cc1acb (diff)
parent27043ec8df9d82c554f19802e172d946f3d3c0b7 (diff)
downloadrust-libc-4dd66657b70561637afa75f90ff4a341527b264f.tar.gz
Auto merge of #1030 - mati865:android_enoattr, r=alexcrichton
Add ENOATTR for Android PR based on https://github.com/rust-lang/libc/pull/594 It's defined in Android sysroot so it should work without test workaround (CI should catch it otherwise?).
-rw-r--r--libc-test/build.rs2
-rw-r--r--src/unix/notbsd/android/mod.rs3
2 files changed, 4 insertions, 1 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index b76b6f09ce..29e43f6d14 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -560,7 +560,7 @@ fn main() {
// Defined by libattr not libc on linux (hard to test).
// See constant definition for more details.
- "ENOATTR" if linux => true,
+ "ENOATTR" if android || linux => true,
// On mips*-unknown-linux-gnu* CMSPAR cannot be included with the set of headers we
// want to use here for testing. It's originally defined in asm/termbits.h, which is
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs
index 53f957d3e8..55adc5c8d6 100644
--- a/src/unix/notbsd/android/mod.rs
+++ b/src/unix/notbsd/android/mod.rs
@@ -1458,6 +1458,9 @@ pub const SIOCSRARP: ::c_ulong = 0x00008962;
pub const SIOCGIFMAP: ::c_ulong = 0x00008970;
pub const SIOCSIFMAP: ::c_ulong = 0x00008971;
+// Similarity to Linux it's not used but defined for compatibility.
+pub const ENOATTR: ::c_int = ::ENODATA;
+
f! {
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
for slot in cpuset.__bits.iter_mut() {