Skip to content

Commit

Permalink
Auto merge of #2514 - devnexen:netbsd_xattr_api, r=Amanieu
Browse files Browse the repository at this point in the history
netbsd ext attrs api addition
  • Loading branch information
bors committed Nov 6, 2021
2 parents 3124475 + 6e94888 commit 2af710a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,10 @@ fchdir
fchflags
fdatasync
fdopendir
fgetxattr
flistxattr
fremovexattr
fsetxattr
flags_to_string
fmemopen
forkpty
Expand Down Expand Up @@ -1218,6 +1222,7 @@ getutmpx
getutxent
getutxid
getutxline
getxattr
glob
glob_t
globfree
Expand Down Expand Up @@ -1248,7 +1253,10 @@ labs
lastlog
lastlogx
lchflags
lgetxattr
lio_listio
listxattr
llistxaatr
localeconv_l
lockf
login
Expand All @@ -1258,6 +1266,8 @@ logoutx
logwtmp
logwtmpx
login_tty
lremovexattr
lsetxattr
lutimes
lwpid_t
madvise
Expand Down Expand Up @@ -1369,6 +1379,7 @@ regexec
regfree
regmatch_t
regoff_t
removexattr
sched_getparam
sched_getscheduler
sched_get_priority_max
Expand Down Expand Up @@ -1403,6 +1414,7 @@ setservent
settimeofday
setutent
setutxent
setxattr
shmat
shmatt_t
shmctl
Expand Down
44 changes: 44 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2af710a

Please sign in to comment.