2
0
Steffen Jaeckel 4 жил өмнө
parent
commit
748994c55f

+ 6 - 0
src/headers/tomcrypt_cfg.h

@@ -288,6 +288,12 @@ typedef unsigned long ltc_mp_digit;
    #define LTC_HAVE_ROTATE_BUILTIN
 #endif
 
+#if defined(__GNUC__)
+   #define LTC_ALIGN(n) __attribute__((aligned(n)))
+#else
+   #define LTC_ALIGN(n)
+#endif
+
 #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405)
 #  define LTC_DEPRECATED(s) __attribute__((deprecated("replaced by " #s)))
 #  define PRIVATE_LTC_DEPRECATED_PRAGMA(s) _Pragma(#s)

+ 1 - 1
src/headers/tomcrypt_mac.h

@@ -482,7 +482,7 @@ typedef struct {
 #ifdef LTC_GCM_TABLES
    unsigned char       PC[16][256][16]  /* 16 tables of 8x128 */
 #ifdef LTC_GCM_TABLES_SSE2
-__attribute__ ((aligned (16)))
+LTC_ALIGN(16)
 #endif
 ;
 #endif