From: John Gilmore Date: Tue, 14 Sep 1993 04:15:23 +0000 (+0000) Subject: * hosts/std-host.h (offsetof): Define, if not already, for archive.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f26a0e9bcfc7d4228b5128e6ce9850aaa0f1d63f;p=binutils-gdb.git * hosts/std-host.h (offsetof): Define, if not already, for archive.c. --- diff --git a/bfd/hosts/std-host.h b/bfd/hosts/std-host.h index aeac523b62a..6e97d8a0dc4 100644 --- a/bfd/hosts/std-host.h +++ b/bfd/hosts/std-host.h @@ -89,6 +89,11 @@ extern int unlink(); #define BYTES_IN_PRINTF_INT 4 #endif +/* From ANSI C , 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