summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2019-05-22 13:34:02 +0200
committergnzlbg <gonzalobg88@gmail.com>2019-05-23 16:29:28 +0200
commit4774fc1c9fec44d49ebe763eadc87f00d3425d9d (patch)
tree8677a5ed0713bb97ef9df4264387bdbc1ca10924 /src
parenteea0102308d5676919e8b3b4381eab69498d5fe5 (diff)
downloadrust-libc-4774fc1c9fec44d49ebe763eadc87f00d3425d9d.tar.gz
Deprecate ENOATTR on Linux and Android
Diffstat (limited to 'src')
-rw-r--r--src/unix/notbsd/android/mod.rs5
-rw-r--r--src/unix/notbsd/linux/mod.rs7
2 files changed, 8 insertions, 4 deletions
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;