um?
This commit is contained in:
parent
ecb98feb6d
commit
7e35334582
2 changed files with 3 additions and 1 deletions
|
@ -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),
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue