summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc-test/build.rs6
-rw-r--r--src/unix/notbsd/android/mod.rs5
-rw-r--r--src/unix/notbsd/linux/mod.rs7
3 files changed, 14 insertions, 4 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index af19881210..5d915e1341 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -1379,6 +1379,12 @@ fn test_android(target: &str) {
// FIXME: deprecated: not available in any header
// See: https://github.com/rust-lang/libc/issues/1356
"ENOATTR" => true,
+
+ // FIXME: still necessary?
+ "SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true, // sighandler_t weirdness
+ // FIXME: still necessary?
+ "SIGUNUSED" => true, // removed in glibc 2.26
+
_ => false,
}
});
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs
index 51a2cafd9f..b6b6784290 100644
--- a/src/unix/notbsd/android/mod.rs
+++ b/src/unix/notbsd/android/mod.rs
@@ -1792,7 +1792,10 @@ pub const SIOCSIFMAP: ::c_ulong = 0x00008971;
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;
-// Similarity to Linux it's not used but defined for compatibility.
+#[deprecated(
+ since = "0.2.55",
+ note = "ENOATTR is not available on Android; use ENODATA instead"
+)]
pub const ENOATTR: ::c_int = ::ENODATA;
// linux/if_alg.h
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 71e2c37629..a76f7a0283 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1409,9 +1409,10 @@ pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
-// On Linux, libc doesn't define this constant, libattr does instead.
-// We still define it for Linux as it's defined by libc on other platforms,
-// and it's mentioned in the man pages for getxattr and setxattr.
+#[deprecated(
+ since = "0.2.55",
+ note = "ENOATTR is not available on Linux; use ENODATA instead"
+)]
pub const ENOATTR: ::c_int = ::ENODATA;
pub const SO_ORIGINAL_DST: ::c_int = 80;