From 131850aa5395b171a8dd6fd046693462b41cdd8f Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Mon, 31 Jul 2017 01:22:50 -0700 Subject: [PATCH] wifi driver: move STRUCT_PACKED to compiler.h There are duplication define for STRUCT_PACKED in wifi driver. This patch moves STRUCT_PACKED define to compiler.h. Change-Id: Ie9af489177364347e3a9c7e260f64df7104ffe95 Signed-off-by: EunBong Song --- apps/wpa_supplicant/src/utils/common.h | 1 - os/drivers/wireless/scsc/utils_scsc.h | 2 -- os/include/tinyara/compiler.h | 3 +++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/wpa_supplicant/src/utils/common.h b/apps/wpa_supplicant/src/utils/common.h index 4aa0f5b..c9b25d2 100644 --- a/apps/wpa_supplicant/src/utils/common.h +++ b/apps/wpa_supplicant/src/utils/common.h @@ -373,7 +373,6 @@ static inline void WPA_PUT_LE64(u8 *a, u64 val) #ifdef __GNUC__ #define PRINTF_FORMAT(a,b) __attribute__ ((format (printf, (a), (b)))) -#define STRUCT_PACKED __attribute__ ((packed)) #else #define PRINTF_FORMAT(a,b) #define STRUCT_PACKED diff --git a/os/drivers/wireless/scsc/utils_scsc.h b/os/drivers/wireless/scsc/utils_scsc.h index cffb1e8..18f4b0a 100644 --- a/os/drivers/wireless/scsc/utils_scsc.h +++ b/os/drivers/wireless/scsc/utils_scsc.h @@ -45,8 +45,6 @@ extern "C" { #define __bitwise #endif -#define STRUCT_PACKED __attribute__ ((__packed__)) - #ifndef __packed #define __packed __attribute__((__packed__)) #endif diff --git a/os/include/tinyara/compiler.h b/os/include/tinyara/compiler.h index 047e5c9..ce7c632 100644 --- a/os/include/tinyara/compiler.h +++ b/os/include/tinyara/compiler.h @@ -138,6 +138,9 @@ #define DSEG #define CODE + +#define STRUCT_PACKED __attribute__ ((packed)) + /* Handle cases where sizeof(int) is 16-bits, sizeof(long) is 32-bits, and * pointers are 16-bits. */ -- 2.7.4