summaryrefslogtreecommitdiffstats
path: root/bfd/hosts/we32k.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/hosts/we32k.h')
-rw-r--r--bfd/hosts/we32k.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/hosts/we32k.h b/bfd/hosts/we32k.h
index c4be61972d..a1791c181b 100644
--- a/bfd/hosts/we32k.h
+++ b/bfd/hosts/we32k.h
@@ -9,11 +9,11 @@
#include <ctype.h>
#include <string.h>
#include <sys/file.h>
-#ifndef O_ACCMODE
+#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif
-#ifndef DONTDECLARE_MALLOC
+#ifndef DONTDECLARE_MALLOC
extern PTR malloc PARAMS ((unsigned));
extern PTR realloc PARAMS ((PTR, unsigned));
#endif
@@ -26,3 +26,8 @@ extern int strtol();
#define NO_STDARG 1
#include "fopen-same.h"
+
+/* From ANSI C <stddef.h>, which we can't depend upon the existence of */
+#ifndef offsetof
+#define offsetof(type,memb) ((size_t)&(((type *)0)->memb))
+#endif
OpenPOWER on IntegriCloud