use fstatat, not fstatat64
the stat64 family of functions were provided as transitional functions, but when building on glibc with _GNU_SOURCE, or any other supported system, the stat functions are equivalent to their stat64 counterpartscute-signatures
parent
336a133b76
commit
2a9c0277c0
|
@ -1338,12 +1338,12 @@ static void handle_alarm(int sig)
|
|||
static char *find_mountpoint(int atfd, const char *rel_path)
|
||||
{
|
||||
struct mntent *me;
|
||||
struct stat64 st;
|
||||
struct stat st;
|
||||
FILE *f;
|
||||
char *ret = NULL;
|
||||
dev_t dev;
|
||||
|
||||
if (fstatat64(atfd, rel_path, &st, 0) != 0)
|
||||
if (fstatat(atfd, rel_path, &st, 0) != 0)
|
||||
return NULL;
|
||||
dev = st.st_dev;
|
||||
|
||||
|
@ -1353,7 +1353,7 @@ static char *find_mountpoint(int atfd, const char *rel_path)
|
|||
while ((me = getmntent(f)) != NULL) {
|
||||
if (strcmp(me->mnt_fsname, "rootfs") == 0)
|
||||
continue;
|
||||
if (fstatat64(atfd, me->mnt_dir, &st, 0) == 0 &&
|
||||
if (fstatat(atfd, me->mnt_dir, &st, 0) == 0 &&
|
||||
st.st_dev == dev) {
|
||||
ret = strdup(me->mnt_dir);
|
||||
break;
|
||||
|
|
4
src/io.c
4
src/io.c
|
@ -755,7 +755,7 @@ void apk_fileinfo_hash_xattr(struct apk_file_info *fi, uint8_t alg)
|
|||
int apk_fileinfo_get(int atfd, const char *filename, unsigned int flags,
|
||||
struct apk_file_info *fi, struct apk_atom_pool *atoms)
|
||||
{
|
||||
struct stat64 st;
|
||||
struct stat st;
|
||||
unsigned int hash_alg = flags & 0xff;
|
||||
unsigned int xattr_hash_alg = (flags >> 8) & 0xff;
|
||||
int atflags = 0;
|
||||
|
@ -766,7 +766,7 @@ int apk_fileinfo_get(int atfd, const char *filename, unsigned int flags,
|
|||
if (flags & APK_FI_NOFOLLOW)
|
||||
atflags |= AT_SYMLINK_NOFOLLOW;
|
||||
|
||||
if (fstatat64(atfd, filename, &st, atflags) != 0)
|
||||
if (fstatat(atfd, filename, &st, atflags) != 0)
|
||||
return -errno;
|
||||
|
||||
*fi = (struct apk_file_info) {
|
||||
|
|
Loading…
Reference in New Issue