aboutsummaryrefslogtreecommitdiff
path: root/pixman/pixman/pixman-compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/pixman/pixman-compiler.h')
-rw-r--r--pixman/pixman/pixman-compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pixman/pixman/pixman-compiler.h b/pixman/pixman/pixman-compiler.h
index ffd51720e..a978accfd 100644
--- a/pixman/pixman/pixman-compiler.h
+++ b/pixman/pixman/pixman-compiler.h
@@ -89,6 +89,10 @@
# define PIXMAN_EXPORT
#endif
+/* member offsets */
+#define CONTAINER_OF(type, member, data) \
+ ((type *)(((uint8_t *)data) - offsetof (type, member)))
+
/* TLS */
#if defined(PIXMAN_NO_TLS)