Added #ifndef guards in compiler_attributes

Building with GCC on Windows using MSYS caused errors related to
macros redefinition in compile_attributes.h due to GCC using its
standard headers. Added #ifndef guards.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
This commit is contained in:
Andrey Borisovich 2022-02-03 21:52:25 +01:00 committed by Liam Girdwood
parent 2c1f089d39
commit eb4a9381d3
1 changed files with 8 additions and 0 deletions

View File

@ -7,15 +7,23 @@
#ifndef __ZEPHYR__
#ifndef __packed
#define __packed __attribute__((packed))
#endif
#ifndef __unused
#define __unused __attribute__((unused))
#endif
#endif
#ifndef __aligned
#define __aligned(x) __attribute__((__aligned__(x)))
#endif
#ifndef __section
#define __section(x) __attribute__((section(x)))
#endif
#if defined(__clang__) || !defined(__XCC__)