aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/util.h b/src/util.h
index 07654ec..49a1cd9 100644
--- a/src/util.h
+++ b/src/util.h
@@ -57,11 +57,8 @@
#endif
#ifndef container_of
-#define container_of(ptr, type, member) \
- __extension__({ \
- void *__mptr = (void *)(ptr); \
- ((type *)(__mptr - offsetof(type, member))); \
- })
+#define container_of(ptr, type, member) \
+ ((type *) (((char *)(ptr)) - offsetof(type, member)))
#endif
#ifndef G_SIZEOF_MEMBER