summaryrefslogtreecommitdiff
path: root/src/apk_defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r--src/apk_defines.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h
index 1a84ea0..5373725 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -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); \