Skip to content

Commit

Permalink
Merge pull request #945 from kraj/kraj/musl
Browse files Browse the repository at this point in the history
Fixes for building on musl systems
  • Loading branch information
aschnell authored Oct 21, 2024
2 parents 64efd34 + 0b39f44 commit 6a74818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions snapper/BcachefsUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <cstring>
#include <cerrno>
#include <linux/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>

Expand Down
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 6a74818

Please sign in to comment.