From 03351b5f9c315e8495df2c75113edc91f274eb1c Mon Sep 17 00:00:00 2001 From: Niko Date: Mon, 10 Feb 2025 14:14:20 -0700 Subject: [PATCH] Fix Windows being special again --- src/common_logging.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common_logging.rs b/src/common_logging.rs index a944906..e3cffee 100644 --- a/src/common_logging.rs +++ b/src/common_logging.rs @@ -48,7 +48,10 @@ pub(crate) use {generic_debug, generic_error, generic_info, generic_trace, gener // Unsigned integer type on most platforms is 32 bit, niche platforms that whisper.cpp // likely doesn't even support would use 16 bit and would still fit -#[repr(u32)] +#[cfg_attr(any(not(windows), target_env = "gnu"), repr(u32))] +// Of course Windows thinks it's a special little shit and +// picks a signed integer for an unsigned type +#[cfg_attr(all(windows, not(target_env = "gnu")), repr(i32))] pub(crate) enum GGMLLogLevel { None = whisper_rs_sys::ggml_log_level_GGML_LOG_LEVEL_NONE, Info = whisper_rs_sys::ggml_log_level_GGML_LOG_LEVEL_INFO,