summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2021-12-27 13:57:13 -0600
committerTimo Teräs <timo.teras@iki.fi>2021-12-29 07:52:48 +0000
commit2a9c0277c0d633d940a48726b214b89de2957d07 (patch)
tree400d8a36ec8719d08a585c731ad0ead4b7d1433f /src/database.c
parent336a133b7651ef58a9ac075b1a98ef536ea91d4f (diff)
downloadapk-tools-2a9c0277c0d633d940a48726b214b89de2957d07.tar.gz
apk-tools-2a9c0277c0d633d940a48726b214b89de2957d07.tar.bz2
apk-tools-2a9c0277c0d633d940a48726b214b89de2957d07.tar.xz
apk-tools-2a9c0277c0d633d940a48726b214b89de2957d07.zip
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 counterparts
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/database.c b/src/database.c
index b0c00aa..8698247 100644
--- a/src/database.c
+++ b/src/database.c
@@ -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;