Skip to content

Commit 9de45c3

Browse files
authored
fix: crypto implementations not being compiled (#8)
1 parent dcb1864 commit 9de45c3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

build.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,30 +69,26 @@ pub fn build(b: *std.Build) void {
6969
ssh2_lib.root_module.addCSourceFiles(.{ .files = ssh2_src, .root = upstream.path(""), .flags = ssh2_flags });
7070

7171
if (mbedtls) {
72-
ssh2_lib.root_module.addCSourceFile(.{ .file = upstream.path("src/mbedtls.c"), .flags = ssh2_flags });
7372
ssh2_lib.root_module.addCMacro("LIBSSH2_MBEDTLS", "1");
7473
ssh2_lib.linkSystemLibrary("mbedtls");
7574
ssh2_lib.linkSystemLibrary("mbedcrypto");
7675
ssh2_lib.linkSystemLibrary("mbedx509");
7776
}
7877

7978
if (openssl) {
80-
ssh2_lib.root_module.addCSourceFile(.{ .file = upstream.path("src/openssl.c"), .flags = ssh2_flags });
8179
ssh2_lib.root_module.addCMacro("LIBSSH2_OPENSSL", "1");
8280
ssh2_lib.linkSystemLibrary("ssl");
8381
ssh2_lib.linkSystemLibrary("crypto");
8482
}
8583

8684
if (wincng) {
87-
ssh2_lib.root_module.addCSourceFile(.{ .file = upstream.path("src/wincng.c"), .flags = ssh2_flags });
8885
ssh2_lib.root_module.addCMacro("LIBSSH2_WINCNG", "1");
8986
// Windows system libs (zig handles names)
9087
ssh2_lib.linkSystemLibrary("bcrypt");
9188
ssh2_lib.linkSystemLibrary("ncrypt");
9289
}
9390

9491
if (libgcrypt) {
95-
ssh2_lib.root_module.addCSourceFile(.{ .file = upstream.path("src/libgcrypt.c"), .flags = ssh2_flags });
9692
ssh2_lib.root_module.addCMacro("LIBSSH2_LIBGCRYPT", "1");
9793
ssh2_lib.linkSystemLibrary("gcrypt");
9894
}
@@ -136,6 +132,7 @@ pub const ssh2_src: []const []const u8 = &.{
136132
"src/userauth.c",
137133
"src/userauth_kbd_packet.c",
138134
"src/version.c",
135+
"src/crypto.c",
139136
};
140137

141138
pub const ssh2_flags: []const []const u8 = &.{};

0 commit comments

Comments
 (0)