add extended attributes constants on NetBSD

This commit is contained in:
Steve Lau 2022-11-02 17:05:31 +08:00
parent 301790eecd
commit 1422cee067
3 changed files with 11 additions and 1 deletions

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",

View file

@ -1534,4 +1534,7 @@ vm_size_t
wait4
waitid
dirname
basename
basename
XATTR_CREATE
XATTR_REPLACE
EXTATTR_NAMESPACE_EMPTY

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