* hosts/std-host.h (offsetof): Define, if not already, for archive.c.
authorJohn Gilmore <gnu@cygnus>
Tue, 14 Sep 1993 04:15:23 +0000 (04:15 +0000)
committerJohn Gilmore <gnu@cygnus>
Tue, 14 Sep 1993 04:15:23 +0000 (04:15 +0000)
bfd/hosts/std-host.h

index aeac523b62ace22f92330b23bf86f5cbbac85625..6e97d8a0dc497f7cf25399c6579b167db73b45b3 100644 (file)
@@ -89,6 +89,11 @@ extern int unlink();
 #define BYTES_IN_PRINTF_INT 4
 #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
+
 #include "fopen-same.h"
 #define hosts_std_host_H
 #endif