Commit d6047775 authored by Timo Teräs's avatar Timo Teräs

defines: add typeof() as it's gcc built-in

Related to MR !15
parent 45d313c5
Pipeline #6699 passed with stage
in 1 minute and 4 seconds
......@@ -54,6 +54,10 @@ static inline int IS_ERR_OR_NULL(const void *ptr) { return IS_ERR(ptr) || !ptr;
#define unlikely(x) __builtin_expect((!!(x)),0)
#endif
#ifndef typeof
#define typeof(x) __typeof__(x)
#endif
#ifndef container_of
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment