From c5879812be778d529b5125cf6ab44a14917b8cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 2 Jul 2026 12:42:06 +0200 Subject: [PATCH] libzigc: MinGW-w64 now provides strndup() --- lib/c/string.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/c/string.zig b/lib/c/string.zig index ee4f7eb9b204b34a947821fb2038f4317e60a0a4..2cd0c0467b46e06370f2e1d7de58a34db7d38584 100644 --- a/lib/c/string.zig +++ b/lib/c/string.zig @@ -4,6 +4,8 @@ const symbol = @import("../c.zig").symbol; const c = std.c; comptime { + symbol(&strndup, "strndup"); + if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) { // memcpy implemented in compiler_rt // memmove implemented in compiler_rt @@ -26,7 +28,6 @@ comptime { symbol(&strstr, "strstr"); symbol(&strtok, "strtok"); symbol(&strdup, "strdup"); - symbol(&strndup, "strndup"); // strlen is in compiler_rt symbol(&strtok_r, "strtok_r"); -- 2.54.0