aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 89d389c..86ea5ba 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -50,6 +50,10 @@ Boston, MA 02111-1307, USA. */
#define NULL 0
#endif
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
/* The compiler is not a multi-threaded application and therefore we
do not have to use the locking functions.