Skip to content

Commit

Permalink
Merge pull request #103 from LordAsdi/master
Browse files Browse the repository at this point in the history
Fix build.zig to allow cross compilation on windows
  • Loading branch information
renerocksai authored May 26, 2024
2 parents 70c0ef1 + b19f84c commit 094d4cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ pub fn build(b: *std.Build) !void {

const use_openssl = b.option(bool, "openssl", "Use system-installed openssl for TLS support in zap") orelse blk: {
// Alternatively, use an os env var to determine whether to build openssl support
if (std.posix.getenv("ZAP_USE_OPENSSL")) |val| {
if (std.process.getEnvVarOwned(b.allocator, "ZAP_USE_OPENSSL")) |val| {
defer b.allocator.free(val);
if (std.mem.eql(u8, val, "true")) break :blk true;
}
} else |_| {}
break :blk false;
};

Expand Down

0 comments on commit 094d4cf

Please sign in to comment.