diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-28 11:50:01 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-28 11:50:01 -0700 |
commit | b69afa010ee04924b36cd9b605e8f37ed917f0b2 (patch) | |
tree | abc5eb7e797db292792a252c096a5b99e5bc0058 /node | |
parent | 708aac1ea73a01fd81997a7215824dab832ba3d3 (diff) | |
download | infinitytier-b69afa010ee04924b36cd9b605e8f37ed917f0b2.tar.gz infinitytier-b69afa010ee04924b36cd9b605e8f37ed917f0b2.zip |
Disable type punning on ARM by ifdef.
Diffstat (limited to 'node')
-rw-r--r-- | node/Constants.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <endian.h> #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__ |