Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add extended attributes constants on NetBSD #2988

Merged
merged 1 commit into from Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions libc-test/build.rs
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion libc-test/semver/netbsd.txt
Expand Up @@ -1534,4 +1534,7 @@ vm_size_t
wait4
waitid
dirname
basename
basename
XATTR_CREATE
XATTR_REPLACE
EXTATTR_NAMESPACE_EMPTY
6 changes: 6 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Expand Up @@ -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
Expand Down