diff --git a/src/int128_struct_impl.h b/src/int128_struct_impl.h index f92b04b116..caa5413b06 100644 --- a/src/int128_struct_impl.h +++ b/src/int128_struct_impl.h @@ -3,7 +3,7 @@ #include "int128.h" -#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_ARM64)) /* MSVC */ +#if defined(_MSC_VER) && defined(_WIN64) && (defined(_M_X64) || defined(_M_ARM64)) /* 64-bit MSVC */ # if defined(_M_X64) /* On x84_64 MSVC, use native __(u)mul128 for 64x64->128 multiplications. */ # include diff --git a/src/util.h b/src/util.h index 9292893c03..7145070009 100644 --- a/src/util.h +++ b/src/util.h @@ -244,7 +244,7 @@ static SECP256K1_INLINE void secp256k1_int_cmov(int *r, const int *a, int flag) #elif defined(UINT128_MAX) || defined(__SIZEOF_INT128__) # define SECP256K1_WIDEMUL_INT128 1 # define SECP256K1_INT128_NATIVE 1 -#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_ARM64)) +#elif defined(_MSC_VER) && defined(_WIN64) && (defined(_M_X64) || defined(_M_ARM64)) # define SECP256K1_WIDEMUL_INT128 1 # define SECP256K1_INT128_STRUCT 1 #else