Skip to content

Commit 04fe193

Browse files
committed
Define XATTR_{CREATE,REPLACE} for all linux_like
Android also supports these attributes[1]. Move the definitions into the parent linux_like module. [1] https://android.googlesource.com/platform/bionic/+/921b3a4642c2d24e7580ae542ff10e0319a2453d/libc/kernel/uapi/linux/xattr.h#24
1 parent a016994 commit 04fe193

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/unix/linux_like/emscripten/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,9 +1153,6 @@ pub const ITIMER_REAL: ::c_int = 0;
11531153
pub const ITIMER_VIRTUAL: ::c_int = 1;
11541154
pub const ITIMER_PROF: ::c_int = 2;
11551155

1156-
pub const XATTR_CREATE: ::c_int = 0x1;
1157-
pub const XATTR_REPLACE: ::c_int = 0x2;
1158-
11591156
pub const _POSIX_VDISABLE: ::cc_t = 0;
11601157

11611158
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;

src/unix/linux_like/linux/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,9 +1712,6 @@ pub const TFD_CLOEXEC: ::c_int = O_CLOEXEC;
17121712
pub const TFD_NONBLOCK: ::c_int = O_NONBLOCK;
17131713
pub const TFD_TIMER_ABSTIME: ::c_int = 1;
17141714

1715-
pub const XATTR_CREATE: ::c_int = 0x1;
1716-
pub const XATTR_REPLACE: ::c_int = 0x2;
1717-
17181715
pub const _POSIX_VDISABLE: ::cc_t = 0;
17191716

17201717
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;

src/unix/linux_like/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,9 @@ pub const PROT_READ: ::c_int = 1;
546546
pub const PROT_WRITE: ::c_int = 2;
547547
pub const PROT_EXEC: ::c_int = 4;
548548

549+
pub const XATTR_CREATE: ::c_int = 0x1;
550+
pub const XATTR_REPLACE: ::c_int = 0x2;
551+
549552
cfg_if! {
550553
if #[cfg(not(target_env = "uclibc"))] {
551554
pub const LC_CTYPE: ::c_int = 0;

0 commit comments

Comments
 (0)