Skip to content

Commit 3b254c3

Browse files
committed
fix build on freebsd because of missing explicit_bzero symbol
1 parent 0307af6 commit 3b254c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ pub fn build(b: *Build) void {
2121
.root = mbedtls_dep.path("library"),
2222
.files = srcs,
2323
});
24+
if (target.result.os.tag == .freebsd) {
25+
// Otherwise `explicit_bzero` cannot be found
26+
mbedtls.root_module.addCMacro("__BSD_VISIBLE", "1");
27+
}
2428

2529
mbedtls.installHeadersDirectory(mbedtls_dep.path("include/mbedtls"), "mbedtls", .{});
2630
mbedtls.installHeadersDirectory(mbedtls_dep.path("include/psa"), "psa", .{});

0 commit comments

Comments
 (0)