diff options
author | bors <bors@rust-lang.org> | 2022-11-03 11:20:42 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2022-11-03 11:20:42 +0000 |
commit | f7e6930ae8fbf97a0065e52884ee7c4eb920e77e (patch) | |
tree | c714ce4517d788fc724c05331f7a516e74b8f0c8 /src | |
parent | 1ca1c4167ad6b5dc6e6a424378e88874f5970f9d (diff) | |
parent | 1422cee067e25f6336e730f7b71c75030659357b (diff) | |
download | rust-libc-f7e6930ae8fbf97a0065e52884ee7c4eb920e77e.tar.gz |
Auto merge of #2988 - SteveLauC:XATTR-constants-on-NetBSD, r=JohnTitor
add extended attributes constants on NetBSD
Add three EA-related constants on NetBSD:
1. [XATTR_CREATE](https://github.com/NetBSD/src/blob/ac36f3f9fee8aff1c69d653503149faaa531f752/sys/sys/xattr.h#L54)
2. [XATTR_REPLACE](https://github.com/NetBSD/src/blob/ac36f3f9fee8aff1c69d653503149faaa531f752/sys/sys/xattr.h#L55)
3. [EXTATTR_NAMESPACE_EMPTY](https://github.com/NetBSD/src/blob/ac36f3f9fee8aff1c69d653503149faaa531f752/sys/sys/extattr.h#L44)
And include `sys/xattr.h` in the test.
Diffstat (limited to 'src')
-rw-r--r-- | src/unix/bsd/netbsdlike/netbsd/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 4b201e3400..62ddae257d 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -2315,6 +2315,12 @@ pub const _REG_RFLAGS: ::c_int = 23; pub const _REG_RSP: ::c_int = 24; pub const _REG_SS: ::c_int = 25; +// sys/xattr.h +pub const XATTR_CREATE: ::c_int = 0x01; +pub const XATTR_REPLACE: ::c_int = 0x02; +// sys/extattr.h +pub const EXTATTR_NAMESPACE_EMPTY: ::c_int = 0; + const_fn! { {const} fn _ALIGN(p: usize) -> usize { (p + _ALIGNBYTES) & !_ALIGNBYTES |