summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-03 11:20:42 +0000
committerbors <bors@rust-lang.org>2022-11-03 11:20:42 +0000
commitf7e6930ae8fbf97a0065e52884ee7c4eb920e77e (patch)
treec714ce4517d788fc724c05331f7a516e74b8f0c8 /src
parent1ca1c4167ad6b5dc6e6a424378e88874f5970f9d (diff)
parent1422cee067e25f6336e730f7b71c75030659357b (diff)
downloadrust-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.rs6
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