diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-28 14:26:56 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-28 14:26:56 +0100 |
commit | dec86ca07dcd95d2eba47aaa946f1e95acfc9f57 (patch) | |
tree | b6f191f3ff59cbc8377e4501336447f97486ab33 /contrib/t1ha | |
parent | 12da94dc1d36900e16d336c766bfde1cbbcf90ff (diff) | |
download | rspamd-dec86ca07dcd95d2eba47aaa946f1e95acfc9f57.tar.gz rspamd-dec86ca07dcd95d2eba47aaa946f1e95acfc9f57.zip |
[Minor] Try to fix build for old compilers...
Diffstat (limited to 'contrib/t1ha')
-rw-r--r-- | contrib/t1ha/t1ha0.c | 8 | ||||
-rw-r--r-- | contrib/t1ha/t1ha0_ia32aes_a.h | 10 | ||||
-rw-r--r-- | contrib/t1ha/t1ha_bits.h | 7 |
3 files changed, 18 insertions, 7 deletions
diff --git a/contrib/t1ha/t1ha0.c b/contrib/t1ha/t1ha0.c index 16cbefa5a..14761d8cd 100644 --- a/contrib/t1ha/t1ha0.c +++ b/contrib/t1ha/t1ha0.c @@ -44,6 +44,14 @@ #include "config.h" #include "t1ha_bits.h" +#if defined(__ia32__) || defined(__e2k__) +#include <x86intrin.h> +#endif + +#if defined(__ia32__) +#include <cpuid.h> +#endif + static __always_inline uint32_t tail32_le(const void *v, size_t tail) { const uint8_t *p = (const uint8_t *)v; #ifdef can_read_underside diff --git a/contrib/t1ha/t1ha0_ia32aes_a.h b/contrib/t1ha/t1ha0_ia32aes_a.h index fa02e419e..7399c15d1 100644 --- a/contrib/t1ha/t1ha0_ia32aes_a.h +++ b/contrib/t1ha/t1ha0_ia32aes_a.h @@ -43,6 +43,7 @@ #include "t1ha_bits.h" + #if T1HA0_AESNI_AVAILABLE #pragma GCC push_options @@ -57,6 +58,15 @@ #define __AES__ #endif #include <immintrin.h> +#if defined(__ia32__) || defined(__e2k__) +#include <x86intrin.h> +#endif + +#if defined(__ia32__) +#include <cpuid.h> +#endif + +uint64_t T1HA_IA32AES_NAME(const void *data, size_t len, uint64_t seed) __attribute__((target("aes"))); uint64_t T1HA_IA32AES_NAME(const void *data, size_t len, uint64_t seed) { uint64_t a = seed; diff --git a/contrib/t1ha/t1ha_bits.h b/contrib/t1ha/t1ha_bits.h index eb032a69c..6b6370031 100644 --- a/contrib/t1ha/t1ha_bits.h +++ b/contrib/t1ha/t1ha_bits.h @@ -94,13 +94,6 @@ #if __GNUC_PREREQ(4, 4) || defined(__clang__) -#if defined(__ia32__) || defined(__e2k__) -#include <x86intrin.h> -#endif - -#if defined(__ia32__) -#include <cpuid.h> -#endif #if defined(__e2k__) #include <e2kbuiltin.h> |