From e2db88c634ed5855e8f11643eed9557b2c495fa9 Mon Sep 17 00:00:00 2001 From: torque Date: Mon, 6 Nov 2023 23:20:48 -0800 Subject: [PATCH] build.zig: update for 3.8.2 I had a big thing written here about how including opensslconf.h broke but then I found out I had accidentally committed an arch-specific opensslconf in the source tree somehow in the other branches. Whoops. Anyway, the build system copies this around now so it should work even better (???). --- build.zig | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/build.zig b/build.zig index 3757345..d926b32 100644 --- a/build.zig +++ b/build.zig @@ -243,6 +243,13 @@ pub fn libresslBuild( else => @panic("unsupported target CPU arch"), }; + try b.build_root.handle.copyFile( + conf_header, + b.build_root.handle, + source_header_prefix ++ "openssl/opensslconf.h", + .{}, + ); + libressl_libs.libcrypto.installHeader(conf_header, "openssl/opensslconf.h"); libressl_libs.libssl.installHeader(conf_header, "openssl/opensslconf.h"); libressl_libs.libtls.installHeader(conf_header, "openssl/opensslconf.h"); @@ -311,34 +318,6 @@ pub fn build(b: *std.Build) !void { _ = try libresslBuild(b, .{ .target = target, .optimize = optimize }); } -// libressl_libs.defineCMacro("HAVE_ASPRINTF", null); -// libressl_libs.defineCMacro("HAVE_REALLOCARRAY", null); -// libressl_libs.defineCMacro("HAVE_STRCASECMP", null); -// libressl_libs.defineCMacro("HAVE_STRLCAT", null); -// libressl_libs.defineCMacro("HAVE_STRLCPY", null); -// libressl_libs.defineCMacro("HAVE_STRNDUP", null); -// libressl_libs.defineCMacro("HAVE_STRNLEN", null); -// libressl_libs.defineCMacro("HAVE_STRSEP", null); -// libressl_libs.defineCMacro("HAVE_STRTONUM", null); -// libressl_libs.defineCMacro("HAVE_TIMEGM", null); -// libressl_libs.defineCMacro("HAVE_ARC4RANDOM_BUF", null); -// libressl_libs.defineCMacro("HAVE_ARC4RANDOM_UNIFORM", null); -// libressl_libs.defineCMacro("HAVE_EXPLICIT_BZERO", null); -// libressl_libs.defineCMacro("HAVE_GETAUXVAL", null); -// libressl_libs.defineCMacro("HAVE_GETENTROPY", null); -// libressl_libs.defineCMacro("HAVE_GETPAGESIZE", null); -// libressl_libs.defineCMacro("HAVE_GETPROGNAME", null); -// libressl_libs.defineCMacro("HAVE_SYSLOG_R", null); -// libressl_libs.defineCMacro("HAVE_SYSLOG", null); -// libressl_libs.defineCMacro("HAVE_TIMESPECSUB", null); -// libressl_libs.defineCMacro("HAVE_TIMINGSAFE_BCMP", null); -// libressl_libs.defineCMacro("HAVE_MEMCMP", null); -// libressl_libs.defineCMacro("HAVE_MEMMEM", null); -// libressl_libs.defineCMacro("HAVE_ENDIAN_H", null); -// libressl_libs.defineCMacro("HAVE_MACHINE_ENDIAN_H", null); -// libressl_libs.defineCMacro("HAVE_ERR_H", null); -// libressl_libs.defineCMacro("HAVE_NETINET_IP_H", null); - const SkipSpec = union(enum) { starts_with: []const u8, ends_with: []const u8,