1 #ifndef _EXT2FS_COMPILER_H
2 #define _EXT2FS_COMPILER_H
8 #define container_of(ptr, type, member) ({ \
9 __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
10 (type *)( (char *)__mptr - offsetof(type,member) );})
12 #define container_of(ptr, type, member) \
13 ((type *)((char *)(ptr) - offsetof(type, member)))
17 #endif /* _EXT2FS_COMPILER_H */