mirb_completion.c: fix strndup for MinGW

Use _WIN32 instead of _MSC_VER to provide strndup implementation
for all Windows compilers including MinGW/MSYS.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-12-26 21:21:20 +09:00
parent d51a3504e8
commit 95ae434710
@@ -22,6 +22,10 @@
/* Windows compatibility */
#ifdef _MSC_VER
#define strdup _strdup
#endif
/* strndup is not available on Windows (MSVC and MinGW) */
#ifdef _WIN32
static char*
strndup(const char *s, size_t n)
{