dect
/
libdect
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
libdect/include/dect/utils.h

20 lines
411 B
C

#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) );})
#define __fmtstring(x, y) __attribute__((format(printf, x, y)))
#ifdef __cplusplus
}
#endif
#endif /* _LIBDECT_DECT_UTILS_H */