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.
This commit is contained in:
bors
2022-11-03 11:20:42 +00:00
3 changed files with 11 additions and 1 deletions
+1
View File
@@ -1038,6 +1038,7 @@ fn test_netbsd(target: &str) {
"string.h",
"sys/endian.h",
"sys/exec_elf.h",
"sys/xattr.h",
"sys/extattr.h",
"sys/file.h",
"sys/ioctl.h",
+4 -1
View File
@@ -1534,4 +1534,7 @@ vm_size_t
wait4
waitid
dirname
basename
basename
XATTR_CREATE
XATTR_REPLACE
EXTATTR_NAMESPACE_EMPTY
+6
View File
@@ -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