From c5652bffcbe441880474a8f6c01bccd4d5b0d577 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Fri, 17 Sep 1993 09:08:00 +0000 Subject: Make sure that "offsetof" is defined on all hosts, now that archive.c uses it. --- bfd/hosts/i386v4.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bfd/hosts/i386v4.h') 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 #include -#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 , which we can't depend upon the existence of */ +#ifndef offsetof +#define offsetof(type,memb) ((size_t)&(((type *)0)->memb)) +#endif -- cgit v1.1