aboutsummaryrefslogtreecommitdiff
path: root/bfd/hosts/i386lynx.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/hosts/i386lynx.h')
-rw-r--r--bfd/hosts/i386lynx.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/hosts/i386lynx.h b/bfd/hosts/i386lynx.h
index 971c39c..59adeff 100644
--- a/bfd/hosts/i386lynx.h
+++ b/bfd/hosts/i386lynx.h
@@ -1,6 +1,6 @@
/* Intel 386 running any BSD Unix */
-#ifndef hosts_i386bsd_H
+#ifndef hosts_i386bsd_H
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
@@ -11,7 +11,7 @@
#include <string.h>
#include <sys/file.h>
-#ifndef O_ACCMODE
+#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif
@@ -28,3 +28,8 @@
#define hosts_i386bsd_H
#undef I386 /* Lynx defines this for some reason */
#endif
+
+/* 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