aboutsummaryrefslogtreecommitdiff
path: root/bfd/hosts/rtbsd.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/hosts/rtbsd.h')
-rw-r--r--bfd/hosts/rtbsd.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/hosts/rtbsd.h b/bfd/hosts/rtbsd.h
index d4c3090..42f89de 100644
--- a/bfd/hosts/rtbsd.h
+++ b/bfd/hosts/rtbsd.h
@@ -7,7 +7,7 @@
#include <string.h>
#include <sys/file.h>
-#ifndef O_ACCMODE
+#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif
@@ -18,3 +18,8 @@ extern char *malloc();
extern void free();
#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