aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2004-02-12 02:19:51 +0000
committerH. Peter Anvin <hpa@zytor.com>2004-02-12 02:19:51 +0000
commit319db49f17251c015670e81ab74215a88887ae38 (patch)
treed32227ba6e2e88251399bd4f75b71dcfe683abb9
parent364e6530ab507c0c2d8a059a3ec7d7954bb2f368 (diff)
downloadklibc-319db49f17251c015670e81ab74215a88887ae38.tar.gz
Fix offsetof()klibc-0.108
-rw-r--r--include/stddef.h2
-rw-r--r--klibc/include/stddef.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/stddef.h b/include/stddef.h
index 900c147cd8660..125d2352ec256 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -19,6 +19,6 @@
#endif
#undef offsetof
-#define offsetof(t,m) ((size_t)&((t *)0->m))
+#define offsetof(t,m) ((size_t)&((t *)0)->m)
#endif /* _STDDEF_H */
diff --git a/klibc/include/stddef.h b/klibc/include/stddef.h
index 900c147cd8660..125d2352ec256 100644
--- a/klibc/include/stddef.h
+++ b/klibc/include/stddef.h
@@ -19,6 +19,6 @@
#endif
#undef offsetof
-#define offsetof(t,m) ((size_t)&((t *)0->m))
+#define offsetof(t,m) ((size_t)&((t *)0)->m)
#endif /* _STDDEF_H */