aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-08-20 23:48:18 +0000
committerAlan Modra <amodra@gmail.com>2002-08-20 23:48:18 +0000
commit7abb6dea2c229c53c6dcdd10bc8de0887d41329c (patch)
treeea23e35d84bb09997915c9ede65ff6052e25e6be /ld/ldlang.c
parente4c79bb232f98915a52840211e0db72552551b17 (diff)
downloadgdb-7abb6dea2c229c53c6dcdd10bc8de0887d41329c.zip
gdb-7abb6dea2c229c53c6dcdd10bc8de0887d41329c.tar.gz
gdb-7abb6dea2c229c53c6dcdd10bc8de0887d41329c.tar.bz2
* ldlang.c (offsetof): Define if not defined.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 79de098..6f85945 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -40,6 +40,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "fnmatch.h"
#include "demangle.h"
+#ifndef offsetof
+#define offsetof(TYPE,MEMBER) ((size_t)&(((TYPE*)0)->MEMBER))
+#endif
+
/* FORWARDS */
static lang_statement_union_type *new_statement
PARAMS ((enum statement_enum, size_t, lang_statement_list_type *));