diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
commit | 2d5707c7479eacb3b1ad98e01b53f56a88f8fb78 (patch) | |
tree | d9c334e83692851c02e3e1b8e65570c97bc82481 /lib/sysxattrs.h | |
parent | Initial commit. (diff) | |
download | rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.tar.xz rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.zip |
Adding upstream version 3.2.7.upstream/3.2.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/sysxattrs.h')
-rw-r--r-- | lib/sysxattrs.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/sysxattrs.h b/lib/sysxattrs.h new file mode 100644 index 0000000..024bbd1 --- /dev/null +++ b/lib/sysxattrs.h @@ -0,0 +1,26 @@ +#ifdef SUPPORT_XATTRS + +#if defined HAVE_SYS_XATTR_H +#include <sys/xattr.h> +#elif defined HAVE_ATTR_XATTR_H +#include <attr/xattr.h> +#elif defined HAVE_SYS_EXTATTR_H +#include <sys/extattr.h> +#endif + +/* Linux 2.4 does not define this as a distinct errno value: */ +#ifndef ENOATTR +#define ENOATTR ENODATA +#endif + +ssize_t sys_lgetxattr(const char *path, const char *name, void *value, size_t size); +ssize_t sys_fgetxattr(int filedes, const char *name, void *value, size_t size); +int sys_lsetxattr(const char *path, const char *name, const void *value, size_t size); +int sys_lremovexattr(const char *path, const char *name); +ssize_t sys_llistxattr(const char *path, char *list, size_t size); + +#else + +/* No xattrs available */ + +#endif |