From a282965aa002cecd7019267eb71f9f1513c031c1 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 21 Mar 2018 21:10:57 +0300 Subject: [PATCH] mdbx: add check __ALIGNED__ for UNALIGNED_OK macro. --- src/osal.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/osal.h b/src/osal.h index f708864b..8a34915d 100644 --- a/src/osal.h +++ b/src/osal.h @@ -118,9 +118,11 @@ typedef pthread_mutex_t mdbx_fastmutex_t; #endif #if !defined(UNALIGNED_OK) -#if defined(__i386) || defined(__x86_64__) || defined(_M_IX86) || \ - defined(_M_X64) || defined(i386) || defined(_X86_) || defined(__i386__) || \ - defined(_X86_64_) || defined(__ARM_FEATURE_UNALIGNED) || defined(__e2k__) +#if (defined(__i386) || defined(__x86_64__) || defined(_M_IX86) || \ + defined(_M_X64) || defined(i386) || defined(_X86_) || \ + defined(__i386__) || defined(_X86_64_) || \ + defined(__ARM_FEATURE_UNALIGNED) || defined(__e2k__)) && \ + !defined(__ALIGNED__) #define UNALIGNED_OK 1 #else #define UNALIGNED_OK 0