From: Davidlohr Bueso <dave@xxxxxxx> The packed gcc function attribute is moved to c.h and the arch-specific checks are removed since there is no harm in other platforms having the attribute, it will just make no difference. --- fdisk/sfdisk.c | 9 --------- include/c.h | 3 +++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c index 979eadc..fdc63d6 100644 --- a/fdisk/sfdisk.c +++ b/fdisk/sfdisk.c @@ -115,15 +115,6 @@ error(char *s, ...) { } /* - * arm needs PACKED - use it everywhere? - */ -#if defined(__GNUC__) && (defined(__arm__) || defined(__alpha__)) -#define PACKED __attribute__ ((packed)) -#else -#define PACKED -#endif - -/* * A. About seeking */ diff --git a/include/c.h b/include/c.h index 073615e..26582e4 100644 --- a/include/c.h +++ b/include/c.h @@ -39,10 +39,13 @@ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \ }) +# define PACKED __attribute__ ((packed)) + #else /* !__GNUC__ */ # define __must_be_array(a) 0 # define __attribute__(_arg_) # define ignore_result(x) ((void) (x)) +# define PACKED #endif /* !__GNUC__ */ /* -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html