From 66f61ece724a54253da36f70274bc320faf9f4e2 Mon Sep 17 00:00:00 2001 From: Marcin Kolny Date: Fri, 7 Jul 2023 11:11:10 +0100 Subject: [PATCH] Add more fixes for WebAssembly/WASI build * force use timegm - WASI does not have timezone tables * use basic implementation for `OPENSSL_issetugid()` - WASI doesn't support forking processes CLA: trivial Reviewed-by: Hugo Landau Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/21389) --- crypto/asn1/a_time.c | 2 +- crypto/uid.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c index dd3724fc836..3bce55c01ad 100644 --- a/crypto/asn1/a_time.c +++ b/crypto/asn1/a_time.c @@ -595,7 +595,7 @@ int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b) # define timezone _timezone #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__wasi__) # define USE_TIMEGM #endif diff --git a/crypto/uid.c b/crypto/uid.c index 698127779f5..e26c27c6749 100644 --- a/crypto/uid.c +++ b/crypto/uid.c @@ -10,7 +10,7 @@ #include #include -#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI) +#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI) || defined(__wasi__) int OPENSSL_issetugid(void) { -- 2.47.2