Skip to content

Commit 005c641

Browse files
fix build with musl libc (#27)
1 parent 35d2548 commit 005c641

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.zig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ fn applyOptions(
10161016
fn configHeader(b: *std.Build, t: std.Target) *std.Build.Step.ConfigHeader {
10171017
const is_linux = t.os.tag == .linux;
10181018
const is_unix = t.os.tag != .windows;
1019+
const is_musl = t.isMuslLibC();
10191020

10201021
return b.addConfigHeader(.{
10211022
.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 {
10811082
.HAVE_MEMMOVE = 1,
10821083
.HAVE_MEMCMP = 1,
10831084
.HAVE_WCSLEN = 1,
1084-
.HAVE_WCSLCPY = 1,
1085-
.HAVE_WCSLCAT = 1,
1085+
.HAVE_WCSLCPY = !is_musl,
1086+
.HAVE_WCSLCAT = !is_musl,
10861087
.HAVE__WCSDUP = 0,
10871088
.HAVE_WCSDUP = 1,
10881089
.HAVE_WCSSTR = 1,

0 commit comments

Comments
 (0)