From: Marcin Kolny Date: Fri, 7 Jul 2023 10:11:10 +0000 (+0100) Subject: Add more fixes for WebAssembly/WASI build X-Git-Tag: openssl-3.2.0-alpha1~479 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66f61ece724a54253da36f70274bc320faf9f4e2;p=thirdparty%2Fopenssl.git 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) --- 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) {