aboutsummaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common.c b/common.c
index f76554d..43e53b9 100644
--- a/common.c
+++ b/common.c
@@ -41,6 +41,9 @@
return 0; \
BLOCK_END
+#define CONTAINER_OF(pointer, type, member) \
+ (type *) ((char *) pointer - offsetof (type, member))
+
// --- To be moved to liberty --------------------------------------------------
static void