diff --git a/libc-test/build.rs b/libc-test/build.rs index 8573fbc1a07d8..df4e7f1cf022c 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -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", diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index 97d76cb3049d2..94570952fddfc 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -1534,4 +1534,7 @@ vm_size_t wait4 waitid dirname -basename \ No newline at end of file +basename +XATTR_CREATE +XATTR_REPLACE +EXTATTR_NAMESPACE_EMPTY diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 4b201e3400665..62ddae257d0b3 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