aboutsummaryrefslogtreecommitdiff
path: root/bfd/hosts/i386v4.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/hosts/i386v4.h')
-rw-r--r--bfd/hosts/i386v4.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/hosts/i386v4.h b/bfd/hosts/i386v4.h
index ad4c077..1f46db5 100644
--- a/bfd/hosts/i386v4.h
+++ b/bfd/hosts/i386v4.h
@@ -10,7 +10,7 @@
#include <string.h>
#include <sys/file.h>
-#ifndef O_ACCMODE
+#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif
#define SEEK_SET 0
@@ -48,3 +48,8 @@ extern int fputc();
extern int unlink();
#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