This commit is contained in:
Mars 2025-05-12 22:58:58 -04:00
parent ecb98feb6d
commit 7e35334582
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
2 changed files with 3 additions and 1 deletions

View file

@ -127,7 +127,7 @@ namespace os {
struct statvfs stat; struct statvfs stat;
if (statvfs("/boot", &stat) == -1) if (statvfs("/boot", &stat) == -1)
return Err(DracError::withErrno(std::format("Failed to get filesystem stats for '/boot' (statvfs call failed)"))); return Err(DracError(std::format("Failed to get filesystem stats for '/boot' (statvfs call failed)")));
return DiskSpace { return DiskSpace {
.used_bytes = (stat.f_blocks * stat.f_frsize) - (stat.f_bfree * stat.f_frsize), .used_bytes = (stat.f_blocks * stat.f_frsize) - (stat.f_bfree * stat.f_frsize),

View file

@ -78,6 +78,8 @@ namespace {
return 0; return 0;
#ifdef _WIN32 #ifdef _WIN32
return static_cast<usize>(_mkgmtime(&time)); return static_cast<usize>(_mkgmtime(&time));
#elifdef __HAIKU__
return static_cast<usize>(gmtime(&time));
#else #else
return static_cast<usize>(timegm(&time)); return static_cast<usize>(timegm(&time));
#endif #endif