diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index cc1f29bbc2bc0..9543853b65600 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -1173,6 +1173,10 @@ fchdir fchflags fdatasync fdopendir +fgetxattr +flistxattr +fremovexattr +fsetxattr flags_to_string fmemopen forkpty @@ -1218,6 +1222,7 @@ getutmpx getutxent getutxid getutxline +getxattr glob glob_t globfree @@ -1248,7 +1253,10 @@ labs lastlog lastlogx lchflags +lgetxattr lio_listio +listxattr +llistxaatr localeconv_l lockf login @@ -1258,6 +1266,8 @@ logoutx logwtmp logwtmpx login_tty +lremovexattr +lsetxattr lutimes lwpid_t madvise @@ -1369,6 +1379,7 @@ regexec regfree regmatch_t regoff_t +removexattr sched_getparam sched_getscheduler sched_get_priority_max @@ -1403,6 +1414,7 @@ setservent settimeofday setutent setutxent +setxattr shmat shmatt_t shmctl diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 6b9adaa5646d4..1e2affb7ee675 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -2629,6 +2629,50 @@ extern "C" { tpe: ::c_int, ); + pub fn getxattr( + path: *const ::c_char, + name: *const ::c_char, + value: *mut ::c_void, + size: ::size_t, + ) -> ::ssize_t; + pub fn lgetxattr( + path: *const ::c_char, + name: *const ::c_char, + value: *mut ::c_void, + size: ::size_t, + ) -> ::ssize_t; + pub fn fgetxattr( + filedes: ::c_int, + name: *const ::c_char, + value: *mut ::c_void, + size: ::size_t, + ) -> ::ssize_t; + pub fn setxattr( + path: *const ::c_char, + name: *const ::c_char, + value: *const ::c_void, + size: ::size_t, + ) -> ::c_int; + pub fn lsetxattr( + path: *const ::c_char, + name: *const ::c_char, + value: *const ::c_void, + size: ::size_t, + ) -> ::c_int; + pub fn fsetxattr( + filedes: ::c_int, + name: *const ::c_char, + value: *const ::c_void, + size: ::size_t, + flags: ::c_int, + ) -> ::c_int; + pub fn listxattr(path: *const ::c_char, list: *mut ::c_char, size: ::size_t) -> ::ssize_t; + pub fn llistxattr(path: *const ::c_char, list: *mut ::c_char, size: ::size_t) -> ::ssize_t; + pub fn flistxattr(filedes: ::c_int, list: *mut ::c_char, size: ::size_t) -> ::ssize_t; + pub fn removexattr(path: *const ::c_char, name: *const ::c_char) -> ::c_int; + pub fn lremovexattr(path: *const ::c_char, name: *const ::c_char) -> ::c_int; + pub fn fremovexattr(fd: ::c_int, path: *const ::c_char, name: *const ::c_char) -> ::c_int; + pub fn string_to_flags( string_p: *mut *mut ::c_char, setp: *mut ::c_ulong,