[PATCH] Synchronize list macros with xf86-video-intel

Magnus Kessler Magnus.Kessler at gmx.net
Tue Jul 13 03:11:42 PDT 2010


Commit 5de1b74d64f807b59c730871d4cb171484db9780 in xf86-video-intel
introduced a fix for the container_of macro. Port this fix over to
xorg, to fix compilation failure of xf86-video-intel.
---
 include/list.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/list.h b/include/list.h
index 4ce20a8..579d3cf 100644
--- a/include/list.h
+++ b/include/list.h
@@ -76,7 +76,7 @@ list_is_empty(struct list *head)
 
 #ifndef container_of
 #define container_of(ptr, type, member) \
-    (type *)((char *)(ptr) - (char *) &((type *)0)->member)
+    ((type *)((char *)(ptr) - (char *) &((type *)0)->member))
 #endif
 
 #define list_entry(ptr, type, member) \
-- 
1.7.1



More information about the xorg-devel mailing list