Module: wine Branch: master Commit: 9b4e92a6f153ed4139c8e8c54b6bb0213a66bfc7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9b4e92a6f153ed4139c8e8c54b...
Author: Amine Khaldi amine.khaldi@reactos.org Date: Mon Dec 10 23:16:46 2012 +0100
include: Define LIST_ENTRY using the standard offsetof.
---
include/wine/list.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/wine/list.h b/include/wine/list.h index 9712603..b4d681f 100644 --- a/include/wine/list.h +++ b/include/wine/list.h @@ -21,6 +21,8 @@ #ifndef __WINE_SERVER_LIST_H #define __WINE_SERVER_LIST_H
+#include <stddef.h> + struct list { struct list *next; @@ -227,6 +229,6 @@ static inline void list_move_head( struct list *dst, struct list *src ) /* get pointer to object containing list element */ #undef LIST_ENTRY #define LIST_ENTRY(elem, type, field) \ - ((type *)((char *)(elem) - (size_t)(&((type *)0)->field))) + ((type *)((char *)(elem) - offsetof(type, field)))
#endif /* __WINE_SERVER_LIST_H */