nats-c.build.zig: fix cross-compiling from Linux
There is a case-sensitivity issue here. The Windows documentation calls the library Ws2_32, but the mingw cross-compilation on Linux fails unless it is called `ws3_32`. For some reason, both work on macOS. I have not tried on Windows, but I assume this will probably work there due to everything being extremely insensitive (case-wise) on Windows.
This commit is contained in:
parent
3cf173c923
commit
4a7635fa7b
@ -36,7 +36,7 @@ pub fn nats_c_lib(
|
||||
lib.addCSourceFiles(&.{"src/win-crosshack.c"}, &.{"-fno-sanitize=undefined"});
|
||||
}
|
||||
lib.defineCMacro("_WIN32", null);
|
||||
lib.linkSystemLibrary("Ws2_32");
|
||||
lib.linkSystemLibrary("ws2_32");
|
||||
},
|
||||
.macos => {
|
||||
lib.addCSourceFiles(&unix_sources, &.{"-fno-sanitize=undefined"});
|
||||
|
Loading…
x
Reference in New Issue
Block a user