diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-05 16:15:48 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-05 16:20:35 +0100 |
commit | a875ba39bea4a951e8cf1450ba9722b7cda95943 (patch) | |
tree | 3d460e16fce29da230a794cc52b6c693bcda1140 | |
parent | 2536ad044b259eb3ce3e7b1ccf2c59ab3fe37d06 (diff) |
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 <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/compiler.h | 4 | ||||
-rw-r--r-- | src/sna/sna_render.h | 2 |
2 files changed, 3 insertions, 3 deletions
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; |