| ... | @@ -4,6 +4,8 @@ const symbol = @import("../c.zig").symbol; | ... | @@ -4,6 +4,8 @@ const symbol = @import("../c.zig").symbol; |
| 4 | const c = std.c; | 4 | const c = std.c; |
| 5 | | 5 | |
| 6 | comptime { | 6 | comptime { |
| | 7 | symbol(&strndup, "strndup"); |
| | 8 | |
| 7 | if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) { | 9 | if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) { |
| 8 | // memcpy implemented in compiler_rt | 10 | // memcpy implemented in compiler_rt |
| 9 | // memmove implemented in compiler_rt | 11 | // memmove implemented in compiler_rt |
| ... | @@ -26,7 +28,6 @@ comptime { | ... | @@ -26,7 +28,6 @@ comptime { |
| 26 | symbol(&strstr, "strstr"); | 28 | symbol(&strstr, "strstr"); |
| 27 | symbol(&strtok, "strtok"); | 29 | symbol(&strtok, "strtok"); |
| 28 | symbol(&strdup, "strdup"); | 30 | symbol(&strdup, "strdup"); |
| 29 | symbol(&strndup, "strndup"); | | |
| 30 | // strlen is in compiler_rt | 31 | // strlen is in compiler_rt |
| 31 | | 32 | |
| 32 | symbol(&strtok_r, "strtok_r"); | 33 | symbol(&strtok_r, "strtok_r"); |