aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/blake2
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-09 10:52:31 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-09 10:52:31 +0000
commitc4e4a60be8bde947c7a93841fc90a9e31ebc6f1e (patch)
treeef4c6711ea07d4db0db5d321cb3f03bec764168b /contrib/blake2
parent58725e3ff089be792a32fc067390a052d8e9e72d (diff)
downloadrspamd-c4e4a60be8bde947c7a93841fc90a9e31ebc6f1e.tar.gz
rspamd-c4e4a60be8bde947c7a93841fc90a9e31ebc6f1e.zip
Small fixes.
Diffstat (limited to 'contrib/blake2')
-rw-r--r--contrib/blake2/blake2-impl.h5
-rw-r--r--contrib/blake2/blake2.h8
2 files changed, 9 insertions, 4 deletions
diff --git a/contrib/blake2/blake2-impl.h b/contrib/blake2/blake2-impl.h
index 5ac7a430f..2a937904b 100644
--- a/contrib/blake2/blake2-impl.h
+++ b/contrib/blake2/blake2-impl.h
@@ -14,8 +14,13 @@
#ifndef __BLAKE2_IMPL_H__
#define __BLAKE2_IMPL_H__
+#include "config.h"
#include <stdint.h>
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define NATIVE_LITTLE_ENDIAN
+#endif
+
static inline uint32_t load32( const void *src )
{
#if defined(NATIVE_LITTLE_ENDIAN)
diff --git a/contrib/blake2/blake2.h b/contrib/blake2/blake2.h
index 7011c57f5..7d611f9a4 100644
--- a/contrib/blake2/blake2.h
+++ b/contrib/blake2/blake2.h
@@ -17,11 +17,11 @@
#include <stddef.h>
#include <stdint.h>
-#ifndef BLAKE_ALIGN
+#ifndef BLAKE_ALIGNED
#if defined(_MSC_VER)
-# define BLAKE_ALIGN(x) __declspec(align(x))
+# define BLAKE_ALIGNED(x) __declspec(align(x))
#else
-# define BLAKE_ALIGN(x) __attribute__((aligned(x)))
+# define BLAKE_ALIGNED(x) __attribute__((aligned(x)))
#endif
#endif
@@ -56,7 +56,7 @@ extern "C" {
uint8_t personal[BLAKE2B_PERSONALBYTES]; // 64
} blake2b_param;
- BLAKE_ALIGN( 64 ) typedef struct __blake2b_state
+ BLAKE_ALIGNED( 64 ) typedef struct __blake2b_state
{
uint64_t h[8];
uint64_t t[2];