From: Georgi Gerganov Date: Fri, 1 May 2026 15:53:30 +0000 (+0300) Subject: ggml : try fix win32 build (whisper/0) X-Git-Tag: upstream/0.0.10438~1437 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=e8ec7ab058136fc6d007280769436ead80a64c70;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml : try fix win32 build (whisper/0) --- diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 54d3eae3e..81343eeb1 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -55,8 +55,13 @@ uint64_t ggml_graph_next_uid(void) { #ifdef _MSC_VER +#if defined(_WIN32) + static volatile LONG counter = 1; + return (uint64_t) InterlockedIncrement(&counter) - 1; +#else static volatile long long counter = 1; return (uint64_t) _InterlockedIncrement64(&counter) - 1; +#endif #else static uint64_t counter = 1; return __atomic_fetch_add(&counter, 1, __ATOMIC_RELAXED);