stm: Only define __packed if not already defined.

Addresses issue #299.
This commit is contained in:
Damien George 2014-02-16 11:24:44 +00:00
parent 5fd7bc3264
commit 8bb11171da
1 changed files with 3 additions and 1 deletions

View File

@ -293,7 +293,9 @@
#elif defined (__ICCARM__) /* IAR Compiler */
#define __packed __packed
#elif defined ( __GNUC__ ) /* GNU Compiler */
#define __packed __attribute__ ((__packed__))
#ifndef __packed /* dpgeorge: add check for already defined symbol, since some compilers define it in cdefs.h */
#define __packed __attribute__ ((__packed__))
#endif
#elif defined (__TASKING__) /* TASKING Compiler */
#define __packed __unaligned
#endif /* __CC_ARM */