aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/stddef.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stddef.h')
-rw-r--r--include/stddef.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stddef.h b/include/stddef.h
index ffcf225..2689311 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -7,7 +7,7 @@ typedef unsigned long size_t;
typedef int wchar_t;
typedef long ptrdiff_t;
-#define offsetof(T, m) (ptrdiff_t)((void*)((T*)0)->m)
+#define offsetof(T, m) ((ptrdiff_t)(void*)(&((T*)0)->m))
// TODO:
// - max_align_t (C11)