?
This commit is contained in:
parent
7e35334582
commit
8af01b5a96
3 changed files with 10 additions and 4 deletions
|
@ -130,8 +130,8 @@ namespace os {
|
|||
return Err(DracError(std::format("Failed to get filesystem stats for '/boot' (statvfs call failed)")));
|
||||
|
||||
return DiskSpace {
|
||||
.used_bytes = (stat.f_blocks * stat.f_frsize) - (stat.f_bfree * stat.f_frsize),
|
||||
.total_bytes = stat.f_blocks * stat.f_frsize,
|
||||
.usedBytes = (stat.f_blocks * stat.f_frsize) - (stat.f_bfree * stat.f_frsize),
|
||||
.totalBytes = stat.f_blocks * stat.f_frsize,
|
||||
};
|
||||
}
|
||||
} // namespace os
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#define NOMINMAX
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#define _DEFAULT_SOURCE
|
||||
#endif
|
||||
|
||||
#include "MetNoService.hpp"
|
||||
|
||||
#include <chrono> // std::chrono::{system_clock, minutes, seconds}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#define NOMINMAX
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#define _DEFAULT_SOURCE
|
||||
#endif
|
||||
|
||||
#include "OpenMeteoService.hpp"
|
||||
|
||||
#include <chrono> // std::chrono::{system_clock, minutes, seconds}
|
||||
|
@ -78,8 +82,6 @@ namespace {
|
|||
return 0;
|
||||
#ifdef _WIN32
|
||||
return static_cast<usize>(_mkgmtime(&time));
|
||||
#elifdef __HAIKU__
|
||||
return static_cast<usize>(gmtime(&time));
|
||||
#else
|
||||
return static_cast<usize>(timegm(&time));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue