From 10e066774f9189ccfc9e9db141e9fb5b39fb6e8c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 16 Sep 2024 10:00:15 +0200 Subject: [PATCH] Make build for Windows working --- abc-sys/build.rs | 1 + logger/src/lib.rs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/abc-sys/build.rs b/abc-sys/build.rs index 4bd45f0..65afe97 100644 --- a/abc-sys/build.rs +++ b/abc-sys/build.rs @@ -1063,6 +1063,7 @@ fn main() { cc.warnings(false) .define("ABC_USE_STDINT_H", "1") + .define("WIN32_NO_DLL", "") .flag_if_supported("-Wno-unused-function") .flag_if_supported("-Wno-write-strings") .flag_if_supported("-Wno-sign-compare") diff --git a/logger/src/lib.rs b/logger/src/lib.rs index 5e2825c..4d27908 100644 --- a/logger/src/lib.rs +++ b/logger/src/lib.rs @@ -53,6 +53,13 @@ impl RssStats { fn now() -> Self { #[cfg(not(miri))] { + #[cfg(target_os = "windows")] + { + Self { + current: MemoryAmount(0), + max: MemoryAmount(0), + } + } #[cfg(target_os = "macos")] { // SAFETY: rusage is plain old data so all zeros is valid