diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2021-12-29 11:51:15 -0600 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-12-29 20:14:41 +0200 |
commit | 9d07d07fe4f663f7ebb5ec6a7ef5d2b1345bcea7 (patch) | |
tree | cdf013da6255db61b9c716a602a17030c285fa26 /src/io.c | |
parent | 6344a0eedbc0bc21b537b51e7cddc13a7ddc5bf3 (diff) | |
download | apk-tools-9d07d07fe4f663f7ebb5ec6a7ef5d2b1345bcea7.tar.gz apk-tools-9d07d07fe4f663f7ebb5ec6a7ef5d2b1345bcea7.tar.bz2 apk-tools-9d07d07fe4f663f7ebb5ec6a7ef5d2b1345bcea7.tar.xz apk-tools-9d07d07fe4f663f7ebb5ec6a7ef5d2b1345bcea7.zip |
abstract differences between GNU and Apple xattr functions
Diffstat (limited to 'src/io.c')
-rw-r--r-- | src/io.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -17,7 +17,6 @@ #include <sys/mman.h> #include <sys/wait.h> #include <sys/stat.h> -#include <sys/xattr.h> #include <pwd.h> #include <grp.h> #include <limits.h> @@ -25,6 +24,7 @@ #include "apk_defines.h" #include "apk_io.h" #include "apk_crypto.h" +#include "apk_xattr.h" #if defined(__GLIBC__) || defined(__UCLIBC__) #define HAVE_FGETPWENT_R @@ -786,12 +786,12 @@ int apk_fileinfo_get(int atfd, const char *filename, unsigned int flags, r = 0; fd = openat(atfd, filename, O_RDONLY); if (fd >= 0) { - len = flistxattr(fd, buf, sizeof(buf)); + len = apk_flistxattr(fd, buf, sizeof(buf)); if (len > 0) { struct apk_xattr_array *xattrs = NULL; apk_xattr_array_init(&xattrs); for (i = 0; i < len; i += strlen(&buf[i]) + 1) { - vlen = fgetxattr(fd, &buf[i], val, sizeof(val)); + vlen = apk_fgetxattr(fd, &buf[i], val, sizeof(val)); if (vlen < 0) { r = errno; if (r == ENODATA) continue; |