aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1991-09-17 01:27:55 +0000
committerStu Grossman <grossman@cygnus>1991-09-17 01:27:55 +0000
commit5e4953bc10261ebf8da309203673e9ed66899a5c (patch)
tree225f16e5ec80d8c177d4afd65fb04c9f6dfad7da /bfd
parent1515ff18db303569b23d0c14478b1862aba2caa6 (diff)
downloadgdb-5e4953bc10261ebf8da309203673e9ed66899a5c.zip
gdb-5e4953bc10261ebf8da309203673e9ed66899a5c.tar.gz
gdb-5e4953bc10261ebf8da309203673e9ed66899a5c.tar.bz2
Put back definition of offsetof. Only define it if it's not defined on this
system.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/oasys.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/oasys.c b/bfd/oasys.c
index 2c0102e..b7834fc 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -29,6 +29,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "oasys.h"
#include "liboasys.h"
+/* Define offsetof for those systems which lack it */
+
+#ifndef offsetof
+#define offsetof(type, identifier) (size_t) &(((type *) 0)->identifier)
+#endif
/* Read in all the section data and relocation stuff too */
PROTO(static boolean,oasys_slurp_section_data,(bfd *CONST abfd));