From a875ba39bea4a951e8cf1450ba9722b7cda95943 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 5 Aug 2013 16:15:48 +0100 Subject: sna: Rename the attribute macro __packed__ to avoid clang barfing Using __packed__ as shorthand for ___attribute__(__packed__) confuses clang as. (I guess to it expands (__packed__) which gcc skips.) As clang also uses packed in its builtins, we have to find a compromise, and so tightly_packed wins for being a more verbose description without the dangerous leading underscores. Signed-off-by: Chris Wilson --- src/sna/compiler.h | 4 ++-- src/sna/sna_render.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sna') diff --git a/src/sna/compiler.h b/src/sna/compiler.h index 28d33511..ff412179 100644 --- a/src/sna/compiler.h +++ b/src/sna/compiler.h @@ -37,7 +37,7 @@ #define must_check __attribute__((warn_unused_result)) #define constant __attribute__((const)) #define pure __attribute__((pure)) -#define __packed__ __attribute__((__packed__)) +#define tightly_packed __attribute__((__packed__)) #define flatten __attribute__((flatten)) #define page_aligned __attribute__((aligned(4096))) #else @@ -49,7 +49,7 @@ #define must_check #define constant #define pure -#define __packed__ +#define tighly_packed #define flatten #define page_aligned #endif diff --git a/src/sna/sna_render.h b/src/sna/sna_render.h index 86df2d02..ad8121e0 100644 --- a/src/sna/sna_render.h +++ b/src/sna/sna_render.h @@ -151,7 +151,7 @@ struct sna_composite_op { struct sna_opacity_box { BoxRec box; float alpha; -} __packed__; +} tightly_packed; struct sna_composite_spans_op { struct sna_composite_op base; -- cgit v1.2.3