From c50874bd5ba69acc16fb15109a9b57f02ea1c0ed Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 27 Dec 2021 13:57:13 -0600 Subject: 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 --- src/database.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/database.c') diff --git a/src/database.c b/src/database.c index 0c91f54..ba53ecb 100644 --- a/src/database.c +++ b/src/database.c @@ -1343,12 +1343,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; @@ -1358,7 +1358,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; -- cgit v1.2.3-60-g2f50