carl9170 tools: add attribute macros to host library file
authorChristian Lamparter <chunkeey@googlemail.com>
Thu, 1 Jan 2015 16:34:17 +0000 (17:34 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Thu, 1 Jan 2015 16:34:17 +0000 (17:34 +0100)
The macros [__packed, __aligned(x), ...] are already defined
as part of newlib's sys/cdefs.h. However they are not part of
standard libc which is used to compile the host tools.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
tools/lib/carlfw.h

index 6e722c944cf7e4266b6902a7c9d729d6dfd101d7..1207e70bfec3a991a1dab8e910b2afc4ccfe0430 100644 (file)
 #ifndef __CARLFW_H
 #define __CARLFW_H
 
+/* These macros are already defined as part of newlib's sys/cdefs.h.
+ * However they are not part of standard libc which is used to compile
+ * the host tools. For now, simply add them here.
+ */
+#define __packed __attribute__((packed))
+#define __unused __attribute__((unused))
+#define __aligned(x) __attribute__((aligned(x)))
+
 #include <linux/types.h>
 #include "compiler.h"
 #include "fwdesc.h"