]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Try to fix build for old compilers...
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 28 Apr 2018 13:26:56 +0000 (14:26 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 28 Apr 2018 13:26:56 +0000 (14:26 +0100)
contrib/t1ha/t1ha0.c
contrib/t1ha/t1ha0_ia32aes_a.h
contrib/t1ha/t1ha_bits.h

index 16cbefa5a8e4d812271fee4a8f329c4b24ad5abc..14761d8cdbc98c0b58c56224be38634b86f6c65c 100644 (file)
 #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
index fa02e419ea9cc7121992f21499fb9354f628c557..7399c15d1d59ad7b0802fce59068884668c43ac8 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "t1ha_bits.h"
 
+
 #if T1HA0_AESNI_AVAILABLE
 
 #pragma GCC push_options
 #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;
index eb032a69c37f87dcd746507382758de7367559ab..6b6370031183faf8524abaf6a31b27d34ac54feb 100644 (file)
 
 #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>