build: fix for zig-0.14 dev
Some checks failed
CI / build (macos-latest, 0.13.0) (push) Has been cancelled
CI / build (true, ubuntu-latest, master) (push) Has been cancelled
CI / build (ubuntu-latest, 0.12.1) (push) Has been cancelled
CI / build (ubuntu-latest, 0.13.0) (push) Has been cancelled
CI / build (windows-latest, 0.13.0) (push) Has been cancelled

`defineCMacro` was removed. Dependencies had to be updated for this as
well.
This commit is contained in:
torque 2025-02-03 23:49:01 -07:00
parent be5a084d6e
commit 6555477c31
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk
2 changed files with 14 additions and 14 deletions

View File

@ -49,7 +49,7 @@ pub fn build(b: *std.Build) void {
const tinfo = target.result;
switch (tinfo.os.tag) {
.windows => {
lib.defineCMacro("_WIN32", null);
lib.root_module.addCMacro("_WIN32", "");
lib.addCSourceFiles(.{
.root = src_root,
.files = win_sources,
@ -58,15 +58,15 @@ pub fn build(b: *std.Build) void {
lib.linkSystemLibrary("ws2_32");
},
else => if (tinfo.isDarwin()) {
lib.defineCMacro("DARWIN", null);
lib.root_module.addCMacro("DARWIN", "");
lib.addCSourceFiles(.{
.root = src_root,
.files = unix_sources,
.flags = cflags,
});
} else {
lib.defineCMacro("_GNU_SOURCE", null);
lib.defineCMacro("LINUX", null);
lib.root_module.addCMacro("_GNU_SOURCE", "");
lib.root_module.addCMacro("LINUX", "");
lib.addCSourceFiles(.{
.root = src_root,
.files = unix_sources,
@ -80,7 +80,7 @@ pub fn build(b: *std.Build) void {
},
}
lib.defineCMacro("_REENTRANT", null);
lib.root_module.addCMacro("_REENTRANT", "");
for (install_headers) |header| {
lib.installHeader(
@ -90,17 +90,17 @@ pub fn build(b: *std.Build) void {
}
if (tls_dep) |dep| {
lib.defineCMacro("NATS_HAS_TLS", null);
lib.defineCMacro("NATS_USE_OPENSSL_1_1", null);
lib.root_module.addCMacro("NATS_HAS_TLS", "");
lib.root_module.addCMacro("NATS_USE_OPENSSL_1_1", "");
if (tls_verify)
lib.defineCMacro("NATS_FORCE_HOST_VERIFICATION", null);
lib.root_module.addCMacro("NATS_FORCE_HOST_VERIFICATION", "");
lib.linkLibrary(dep.artifact("ssl"));
}
if (protobuf_runtime) |dep| {
lib.addIncludePath(upstream.path("deps"));
lib.addIncludePath(upstream.path("stan"));
lib.defineCMacro("NATS_HAS_STREAMING", null);
lib.root_module.addCMacro("NATS_HAS_STREAMING", "");
lib.addCSourceFiles(.{
.root = src_root,
@ -111,7 +111,7 @@ pub fn build(b: *std.Build) void {
}
if (libsodium_dep) |dep| {
lib.defineCMacro("NATS_USE_LIBSODIUM", null);
lib.root_module.addCMacro("NATS_USE_LIBSODIUM", "");
// yep
lib.linkLibrary(dep.artifact(if (tinfo.isMinGW()) "libsodium-static" else "sodium"));
}

View File

@ -8,8 +8,8 @@
.hash = "12203347177845724e82819c0243caa502b054427c75f29e7f22988c67f5a91bd504",
},
.libressl = .{
.url = "git+https://github.com/allyourcodebase/libressl.git?ref=4.0.0#7aa9871c8c9897228662e61d1355f13491857913",
.hash = "1220a9ccbd8d9ba60b665a19ebdc5b412ac48e0eeb588616f087f6dd739a23fed5d6",
.url = "git+https://github.com/allyourcodebase/libressl.git?ref=4.0.0+1#fd0fe777153a75217e97ba22cd8b32005bb90d08",
.hash = "1220c6521dd6d37f0426fbe6c3b3c3f4282f28495311abc08fb4cebf21ea2346ba2f",
.lazy = true,
},
.protobuf_c = .{
@ -18,8 +18,8 @@
.lazy = true,
},
.libsodium = .{
.url = "git+https://github.com/jedisct1/libsodium.git?ref=stable#8f36e67d8dcb7c8bd32b2ccf9891caa7825ead41",
.hash = "122082bb74ee448b76311bb229f3886628a5fdbf0d34ac9bbccec6f28471d82caa3b",
.url = "git+https://github.com/jedisct1/libsodium.git?ref=stable#59a98bc7f9d507175f551a53bfc0b2081f06e3ba",
.hash = "1220297067945b08f44a20b3b20e5e0fd39e178a30d96d4a3531fed5999252f52eea",
.lazy = true,
},
},