]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Use statvfs instead of statvfs64 945/head
authorKhem Raj <raj.khem@gmail.com>
Sun, 20 Oct 2024 14:55:23 +0000 (07:55 -0700)
committerKhem Raj <raj.khem@gmail.com>
Sun, 20 Oct 2024 14:55:23 +0000 (07:55 -0700)
when using LFS64 these functions are same and also
on 64bit systems they are same. musl is using 64bit off_t
by default and does not define LFS64 variants of these functions
and it ends up in build errors

snapper/FileUtils.cc

index d40342797bbad06e62ef2eb95fa85118c6f09930..4c8578a1206fa4060411677b377bde2b45d44232 100644 (file)
@@ -387,9 +387,9 @@ namespace snapper
     std::pair<unsigned long long, unsigned long long>
     SDir::statvfs() const
     {
-       struct statvfs64 fsbuf;
-       if (fstatvfs64(dirfd, &fsbuf) != 0)
-           SN_THROW(IOErrorException(sformat("statvfs64 failed path:%s errno:%d (%s)", base_path.c_str(),
+       struct statvfs fsbuf;
+       if (fstatvfs(dirfd, &fsbuf) != 0)
+           SN_THROW(IOErrorException(sformat("statvfs failed path:%s errno:%d (%s)", base_path.c_str(),
                                              errno, stringerror(errno).c_str())));
 
        // f_bavail is used (not f_bfree) since df seems to do the