mirror of
https://github.com/X11Libre/xf86-video-intel.git
synced 2026-03-24 01:24:12 +00:00
Define __container_of only if not defined yet.
Silence warnings. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -108,8 +108,10 @@ list_move(struct list *list, struct list *head)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __container_of
|
||||
#define __container_of(ptr, sample, member) \
|
||||
(void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
|
||||
#endif
|
||||
|
||||
#define list_for_each_entry(pos, head, member) \
|
||||
for (pos = __container_of((head)->next, pos, member); \
|
||||
|
||||
Reference in New Issue
Block a user