diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-18 11:17:59 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-18 11:17:59 +0100 |
commit | 8793b4a432401f37898b0ea835477ab39b01d311 (patch) | |
tree | f661f41c7abe46ad30ea9d41a0e145e55d414180 /src/libcryptobox/curve25519/curve25519.c | |
parent | 9b575a25a25d5f2956ec4bf8e37080b17c65cafd (diff) | |
download | rspamd-8793b4a432401f37898b0ea835477ab39b01d311.tar.gz rspamd-8793b4a432401f37898b0ea835477ab39b01d311.zip |
Fix build on arm
Issue: #404
Reported by: @Gottox
Diffstat (limited to 'src/libcryptobox/curve25519/curve25519.c')
-rw-r--r-- | src/libcryptobox/curve25519/curve25519.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libcryptobox/curve25519/curve25519.c b/src/libcryptobox/curve25519/curve25519.c index 030c88537..1d04b973b 100644 --- a/src/libcryptobox/curve25519/curve25519.c +++ b/src/libcryptobox/curve25519/curve25519.c @@ -45,7 +45,6 @@ typedef struct curve25519_impl_s { {(cpuflags), desc, scalarmult_##ext} #if defined(__LP64__) - #if defined(HAVE_AVX) CURVE25519_DECLARE(avx); #define CURVE25519_AVX CURVE25519_IMPL(CPUID_AVX, "avx", avx) @@ -56,12 +55,16 @@ CURVE25519_DECLARE(avx); CURVE25519_DECLARE(ref); #define CURVE25519_REF CURVE25519_IMPL(0, "ref", ref) +#if (ARCH == x86_64) || (ARCH == i386) CURVE25519_DECLARE(donna); -#define CURVE25519_DONNA CURVE25519_IMPL(0, "donna", donna) +#define CURVE25519_GENERIC CURVE25519_IMPL(0, "donna", donna) +#else +#define CURVE25519_GENERIC CURVE25519_REF +#endif static const curve25519_impl_t curve25519_list[] = { - CURVE25519_DONNA, + CURVE25519_GENERIC, #if defined(CURVE25519_AVX) CURVE25519_AVX, #endif |