Skip to content

Commit

Permalink
Use statvfs instead of statvfs64
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kraj committed Oct 20, 2024
1 parent d103eae commit 0b39f44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snapper/FileUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b39f44

Please sign in to comment.