From 0b03e2b6a7657ec645399f98ac3b4a683a9dfdf2 Mon Sep 17 00:00:00 2001 From: Adrian Knoth Date: Mon, 27 Jan 2014 22:42:19 +0100 Subject: [PATCH] Fix bus error on ARM platforms With the current code, packed structs lead to unaligned memory access, thus causing SIGBUS on ARM. Let's disable packing on ARM for now. Since it's only used for mixed 32/64bit jackd installations and we're not facing such a scenario on ARM, there's little use to worry more atm. (Commit message copied from jackd2's 2f7d512b, since it's the same problem) --- types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types.h b/types.h index 1e17917..8f2b8cb 100644 --- a/types.h +++ b/types.h @@ -38,7 +38,11 @@ typedef int32_t jack_shmsize_t; than use the natural alignment of the processor and/or compiler. */ +#ifdef __arm__ +# define POST_PACKED_STRUCTURE +#else # define POST_PACKED_STRUCTURE __attribute__((__packed__)) +#endif /* ARM */ #else /* Add other things here for non-gcc platforms */ #endif