Don't redefine typedef names
authorGabor Greif <ggreif@gmail.com>
Mon, 27 Mar 2017 11:33:49 +0000 (13:33 +0200)
committerGabor Greif <ggreif@gmail.com>
Mon, 27 Mar 2017 11:33:49 +0000 (13:33 +0200)
instead define the structs referred to by
 - SectionFormatInfo
 - ObjectCodeFormatInfo

that were only forward-declared earlier.

This fixes redefinition errors with gcc4.4

rts/LinkerInternals.h

index 2217c5e..16fbab2 100644 (file)
@@ -318,12 +318,12 @@ char *cstring_from_section_name(
 || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \
 || defined(openbsd_HOST_OS) || defined(gnu_HOST_OS)
 #  define OBJFORMAT_ELF
-typedef struct _ObjectCodeFormatInfo { void* placeholder;} ObjectCodeFormatInfo;
-typedef struct _SectionFormatInfo { void* placeholder; } SectionFormatInfo;
+struct _SectionFormatInfo { void* placeholder; };
+struct _ObjectCodeFormatInfo { void* placeholder; };
 #elif defined (mingw32_HOST_OS)
 #  define OBJFORMAT_PEi386
-typedef struct _ObjectCodeFormatInfo { void* placeholder;} ObjectCodeFormatInfo;
-typedef struct _SectionFormatInfo { void* placeholder; } SectionFormatInfo;
+struct _SectionFormatInfo { void* placeholder; };
+struct _ObjectCodeFormatInfo { void* placeholder; };
 #elif defined(darwin_HOST_OS) || defined(ios_HOST_OS)
 #  define OBJFORMAT_MACHO
 #  include "linker/MachOTypes.h"