Rashmica Gupta | c1b66f4 | 2022-12-09 16:24:45 +1100 | [diff] [blame] | 1 | #ifndef CONTAINER_OF_H |
2 | #define CONTAINER_OF_H | ||||
3 | |||||
4 | #ifndef container_of | ||||
5 | #define container_of(ptr, type, member) \ | ||||
6 | (type *)((char *)(ptr)-offsetof(type, member)) | ||||
7 | #endif | ||||
8 | |||||
9 | #endif |