From 98e22965207bc7ef4cbf0d95a20739a7ee915a68 Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Thu, 12 Feb 2026 21:49:23 +1100 Subject: [PATCH] attempt to fix error in windows ci --- examples/c/storage.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/c/storage.c b/examples/c/storage.c index c7d2d4ad..5f81d2e7 100644 --- a/examples/c/storage.c +++ b/examples/c/storage.c @@ -6,6 +6,19 @@ #include #include "../../library/libstorage.h" +/* Provide realpath on Windows (not available on some MSVC/MinGW setups) */ +#if defined(_WIN32) || defined(_WIN64) +#include +#if defined(_MSC_VER) +#include +#define realpath(N,R) _fullpath((R),(N),_MAX_PATH) +#else +/* MinGW / other Windows gcc: map to _fullpath using PATH_MAX */ +#include +#define realpath(N,R) _fullpath((R),(N),PATH_MAX) +#endif +#endif + // We need 250 as max retries mainly for the start function in CI. // Other functions should be not need that many retries. #define MAX_RETRIES 250