From b69afa010ee04924b36cd9b605e8f37ed917f0b2 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 28 Jul 2015 11:50:01 -0700 Subject: Disable type punning on ARM by ifdef. --- node/Constants.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'node') diff --git a/node/Constants.hpp b/node/Constants.hpp index 31a4c313..901237ce 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -60,6 +60,13 @@ #include #endif +// Disable type punning on ARM architecture -- some ARM chips throw SIGBUS on unaligned access +#if defined(__arm__) || defined(__ARMEL__) +#ifndef ZT_NO_TYPE_PUNNING +#define ZT_NO_TYPE_PUNNING +#endif +#endif + #if defined(__FreeBSD__) || defined(__OpenBSD__) #ifndef __UNIX_LIKE__ #define __UNIX_LIKE__ -- cgit v1.2.3