From 8aa37b6e6dff729fbb589ed812530a9b3120d268 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 05:01:58 +0000 Subject: [PATCH] Fixes test runner build with newer MinGW, which declares strndup. The Windows fallback was a static "strndup", which conflicts with the declaration in newer MinGW , failing the Windows CI. Use another name for it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NASRhH2Xg6HmeBUZTSPhwM --- testsuite/src/fbtest.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testsuite/src/fbtest.c b/testsuite/src/fbtest.c index 2e49031..2522b94 100644 --- a/testsuite/src/fbtest.c +++ b/testsuite/src/fbtest.c @@ -29,14 +29,16 @@ #ifdef _WIN32 # define PATH_SEP "\\" -// Implement missing "strndup" -static char *strndup(const char *s, size_t n) +// Implement "strndup", missing in older MinGW versions. Use another name, as +// newer MinGW versions declare it in . +static char *fbtest_strndup(const char *s, size_t n) { char *ret = malloc(n + 1); strncpy(ret, s, n); ret[n] = 0; return ret; -}; +} +# define strndup fbtest_strndup #else # define PATH_SEP "/" #endif