From ccda08a5441fc2cab260c1b8f677ef7cf279503b Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Sun, 8 Jun 2025 14:32:07 -0400 Subject: [PATCH] fix build with musl libc --- build.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 2a8d5edf17c49..9934ed875a951 100644 --- a/build.zig +++ b/build.zig @@ -1016,6 +1016,7 @@ fn applyOptions( fn configHeader(b: *std.Build, t: std.Target) *std.Build.Step.ConfigHeader { const is_linux = t.os.tag == .linux; const is_unix = t.os.tag != .windows; + const is_musl = t.isMuslLibC(); return b.addConfigHeader(.{ .style = .{ .cmake = b.path("include/SDL_config.h.cmake") }, @@ -1081,8 +1082,8 @@ fn configHeader(b: *std.Build, t: std.Target) *std.Build.Step.ConfigHeader { .HAVE_MEMMOVE = 1, .HAVE_MEMCMP = 1, .HAVE_WCSLEN = 1, - .HAVE_WCSLCPY = 1, - .HAVE_WCSLCAT = 1, + .HAVE_WCSLCPY = !is_musl, + .HAVE_WCSLCAT = !is_musl, .HAVE__WCSDUP = 0, .HAVE_WCSDUP = 1, .HAVE_WCSSTR = 1,