Skip to content

Commit

Permalink
Auto merge of #2991 - SteveLauC:extattr_list_xx-on-NetBSD, r=JohnTitor
Browse files Browse the repository at this point in the history
add extattr_list_xxx() on NetBSD

Corresponds to [this](https://github.com/NetBSD/src/blob/ac36f3f9fee8aff1c69d653503149faaa531f752/sys/sys/extattr.h#L98-L103):
```c
ssize_t	extattr_list_fd(int _fd, int _attrnamespace, void *_data,
	    size_t _nbytes);
ssize_t	extattr_list_file(const char *_path, int _attrnamespace, void *_data,
	    size_t _nbytes);
ssize_t	extattr_list_link(const char *_path, int _attrnamespace, void *_data,
	    size_t _nbytes);
```
  • Loading branch information
bors committed Nov 7, 2022
2 parents 0acc5c0 + 5763a0f commit 3daacc5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/semver/netbsd.txt
Expand Up @@ -1538,3 +1538,6 @@ basename
XATTR_CREATE
XATTR_REPLACE
EXTATTR_NAMESPACE_EMPTY
extattr_list_fd
extattr_list_file
extattr_list_link
18 changes: 18 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Expand Up @@ -2459,6 +2459,24 @@ extern "C" {
envp: *const *const ::c_char,
) -> ::c_int;

pub fn extattr_list_fd(
fd: ::c_int,
attrnamespace: ::c_int,
data: *mut ::c_void,
nbytes: ::size_t,
) -> ::ssize_t;
pub fn extattr_list_file(
path: *const ::c_char,
attrnamespace: ::c_int,
data: *mut ::c_void,
nbytes: ::size_t,
) -> ::ssize_t;
pub fn extattr_list_link(
path: *const ::c_char,
attrnamespace: ::c_int,
data: *mut ::c_void,
nbytes: ::size_t,
) -> ::ssize_t;
pub fn extattr_delete_fd(
fd: ::c_int,
attrnamespace: ::c_int,
Expand Down

0 comments on commit 3daacc5

Please sign in to comment.