From 007629467586034cba0f69e662bcdb25f5cea025 Mon Sep 17 00:00:00 2001 From: "Caleb J. Gardner" Date: Thu, 12 Feb 2026 02:19:38 -0600 Subject: [PATCH] Small fix to testing to check if libc is linked --- build.zig | 6 ++++++ src/decomp.zig | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index c4d3509..87468dd 100644 --- a/build.zig +++ b/build.zig @@ -44,6 +44,12 @@ pub fn build(b: *std.Build) !void { .root_module = exe_mod, }); + const lib = b.addLibrary(.{ + .name = "squashfs", + .root_module = mod, + }); + + b.installArtifact(lib); b.installArtifact(exe); const run_step = b.step("run", "Run the app"); const run_cmd = b.addRunArtifact(exe); diff --git a/src/decomp.zig b/src/decomp.zig index ce43515..6073024 100644 --- a/src/decomp.zig +++ b/src/decomp.zig @@ -6,8 +6,8 @@ const Reader = std.Io.Reader; const builtin = @import("builtin"); const config = if (builtin.is_test) .{ - .use_c_libs = true, - .allow_lzo = false, + .use_c_libs = builtin.link_libc == true, + .allow_lzo = false, // Change once LZO compilation is fixed } else @import("config"); const c = @cImport({