From: Khem Raj Date: Sun, 20 Oct 2024 14:55:23 +0000 (-0700) Subject: Use statvfs instead of statvfs64 X-Git-Tag: v0.12.0~23^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b39f4484553c796cb300fb4933ea314e91d913b;p=thirdparty%2Fsnapper.git Use statvfs instead of statvfs64 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 --- diff --git a/snapper/FileUtils.cc b/snapper/FileUtils.cc index d4034279..4c8578a1 100644 --- a/snapper/FileUtils.cc +++ b/snapper/FileUtils.cc @@ -387,9 +387,9 @@ namespace snapper std::pair 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