From 8519988d57b4f9cb5ae50b6c9fc27d46cf165fef Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Thu, 27 Oct 2022 10:19:21 +1000 Subject: [PATCH] SP int: guess 64-bit type When ULLONG_MAX not defined and long is the 32-bit type, speculatively use long long as the 64-bit type. --- wolfssl/wolfcrypt/sp_int.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wolfssl/wolfcrypt/sp_int.h b/wolfssl/wolfcrypt/sp_int.h index 018d03daa..2dc89cd73 100644 --- a/wolfssl/wolfcrypt/sp_int.h +++ b/wolfssl/wolfcrypt/sp_int.h @@ -146,6 +146,11 @@ extern "C" { #else #error "Size of unsigned long long not detected" #endif +#elif SP_ULONG_BITS == 32 + /* Speculatively use long long as the 64-bit type as we don't have one + * otherwise. */ + typedef unsigned long long sp_uint64; + typedef long long sp_int64; #else #define SP_ULLONG_BITS 0 #endif