summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan Khoury <aidan@revers.engineering>2023-04-11 12:31:57 -0300
committerHugo Landau <hlandau@openssl.org>2023-04-13 10:25:55 +0100
commitc0e090bd61d2e46a1d8f60f39f10152c87e87753 (patch)
treeb742ddb81763bb395daaa06f31e83929cb2f5dd9
parent51b941ac290864103d00a3d6a3018372b58b01f4 (diff)
Fix UEFI support on win32
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20714)
-rw-r--r--crypto/cryptlib.c4
-rw-r--r--crypto/sleep.c2
-rw-r--r--crypto/time.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index b722d2bb5f..1b1830f31a 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -12,7 +12,7 @@
#include "crypto/cryptlib.h"
#include <openssl/safestack.h>
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(OPENSSL_SYS_UEFI)
# include <tchar.h>
# include <signal.h>
# ifdef __WATCOMC__
@@ -256,7 +256,7 @@ void OPENSSL_die(const char *message, const char *file, int line)
{
OPENSSL_showfatal("%s:%d: OpenSSL internal error: %s\n",
file, line, message);
-#if !defined(_WIN32)
+#if !defined(_WIN32) || defined(OPENSSL_SYS_UEFI)
abort();
#else
/*
diff --git a/crypto/sleep.c b/crypto/sleep.c
index 3eac44dd74..95d6c79233 100644
--- a/crypto/sleep.c
+++ b/crypto/sleep.c
@@ -39,7 +39,7 @@ void OSSL_sleep(uint64_t millis)
usleep(millis * 1000);
# endif
}
-#elif defined(_WIN32)
+#elif defined(_WIN32) && !defined(OPENSSL_SYS_UEFI)
# include <windows.h>
void OSSL_sleep(uint64_t millis)
diff --git a/crypto/time.c b/crypto/time.c
index a90aa76788..4e7d3eebac 100644
--- a/crypto/time.c
+++ b/crypto/time.c
@@ -15,7 +15,7 @@ OSSL_TIME ossl_time_now(void)
{
OSSL_TIME r;
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(OPENSSL_SYS_UEFI)
SYSTEMTIME st;
union {
unsigned __int64 ul;