blob: 6dc6e7d37be16ae0320ae3a8a57920822931a2b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#ifndef _LIBDECT_DECT_UTILS_H
#define _LIBDECT_DECT_UTILS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#ifdef __cplusplus
}
#endif
#endif /* _LIBDECT_DECT_UTILS_H */
|