xref: /openbmc/libmctp/container_of.h (revision 0a4957c99eae05c5f25fe510b9e53e2c2ae0b1e0)
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
10