Skip to content

Commit f7e6930

Browse files
committed
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.
2 parents 1ca1c41 + 1422cee commit f7e6930

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,7 @@ fn test_netbsd(target: &str) {
10381038
"string.h",
10391039
"sys/endian.h",
10401040
"sys/exec_elf.h",
1041+
"sys/xattr.h",
10411042
"sys/extattr.h",
10421043
"sys/file.h",
10431044
"sys/ioctl.h",

libc-test/semver/netbsd.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,4 +1534,7 @@ vm_size_t
15341534
wait4
15351535
waitid
15361536
dirname
1537-
basename
1537+
basename
1538+
XATTR_CREATE
1539+
XATTR_REPLACE
1540+
EXTATTR_NAMESPACE_EMPTY

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,6 +2315,12 @@ pub const _REG_RFLAGS: ::c_int = 23;
23152315
pub const _REG_RSP: ::c_int = 24;
23162316
pub const _REG_SS: ::c_int = 25;
23172317

2318+
// sys/xattr.h
2319+
pub const XATTR_CREATE: ::c_int = 0x01;
2320+
pub const XATTR_REPLACE: ::c_int = 0x02;
2321+
// sys/extattr.h
2322+
pub const EXTATTR_NAMESPACE_EMPTY: ::c_int = 0;
2323+
23182324
const_fn! {
23192325
{const} fn _ALIGN(p: usize) -> usize {
23202326
(p + _ALIGNBYTES) & !_ALIGNBYTES

0 commit comments

Comments
 (0)