Skip to content

Commit 1713b76

Browse files
committed
Add ENOATTR for Linux
1 parent 19f3be3 commit 1713b76

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

ci/run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ if [ "$QEMU" != "" ]; then
9191
-nographic \
9292
-vga none 2>&1 | tee $CARGO_TARGET_DIR/out.log
9393
exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
94+
elif type apt-get &>/dev/null; then
95+
sudo apt-get install libattr1-dev
9496
fi
9597

9698
case "$TARGET" in

libc-test/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ fn main() {
171171
if !uclibc {
172172
// optionally included in uclibc
173173
cfg.header("sys/xattr.h");
174+
cfg.header("attr/xattr.h");
174175
}
175176
cfg.header("sys/ipc.h");
176177
cfg.header("sys/msg.h");
@@ -496,7 +497,7 @@ fn main() {
496497
// clash so it can't be tested
497498
"getxattr" | "lgetxattr" | "fgetxattr" | "setxattr" | "lsetxattr" | "fsetxattr" |
498499
"listxattr" | "llistxattr" | "flistxattr" | "removexattr" | "lremovexattr" |
499-
"fremovexattr" |
500+
"fremovexattr" | "ENOATTR" |
500501
"backtrace" |
501502
"sysinfo" | "newlocale" | "duplocale" | "freelocale" | "uselocale" |
502503
"nl_langinfo_l" | "wcslen" | "wcstombs" if uclibc => true,

src/unix/notbsd/linux/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,8 @@ pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
700700
pub const XATTR_CREATE: ::c_int = 0x1;
701701
pub const XATTR_REPLACE: ::c_int = 0x2;
702702

703+
pub const ENOATTR: ::c_int = ::ENODATA;
704+
703705
f! {
704706
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
705707
for slot in cpuset.bits.iter_mut() {

0 commit comments

Comments
 (0)