This commit is contained in:
Mars 2025-05-12 23:03:15 -04:00
parent 7e35334582
commit 8af01b5a96
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
3 changed files with 10 additions and 4 deletions

View file

@ -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

View file

@ -1,5 +1,9 @@
#define NOMINMAX
#ifdef __HAIKU__
#define _DEFAULT_SOURCE
#endif
#include "MetNoService.hpp"
#include <chrono> // std::chrono::{system_clock, minutes, seconds}

View file

@ -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