From 3e88fbfa6e319780f41bfd1ee886ea630804f125 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 17 Dec 2013 22:44:46 +0100 Subject: [PATCH] * grub-core/loader/machoXX.c: Fix compilation on non-i386. --- ChangeLog | 4 ++++ grub-core/loader/macho32.c | 2 +- grub-core/loader/macho64.c | 2 +- include/grub/i386/macho.h | 19 ------------------- include/grub/macho.h | 18 ++++++++++++++++++ 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d9c9988a..440e9ca44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-17 Vladimir Serbinenko + + * grub-core/loader/machoXX.c: Fix compilation on non-i386. + 2013-12-17 Vladimir Serbinenko * grub-core/loader/i386/xen_fileXX.c: Silence cast-align. diff --git a/grub-core/loader/macho32.c b/grub-core/loader/macho32.c index eda8d9ed7..2de3a5c6f 100644 --- a/grub-core/loader/macho32.c +++ b/grub-core/loader/macho32.c @@ -1,4 +1,4 @@ -#include +#include #include #define SUFFIX(x) x ## 32 diff --git a/grub-core/loader/macho64.c b/grub-core/loader/macho64.c index 417a4a83d..0affceb77 100644 --- a/grub-core/loader/macho64.c +++ b/grub-core/loader/macho64.c @@ -1,4 +1,4 @@ -#include +#include #include #define SUFFIX(x) x ## 64 diff --git a/include/grub/i386/macho.h b/include/grub/i386/macho.h index 5bdf9b213..e15167a50 100644 --- a/include/grub/i386/macho.h +++ b/include/grub/i386/macho.h @@ -29,23 +29,4 @@ #define GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT(x) ((x) == GRUB_MACHO_CPUTYPE_IA32) #endif -struct grub_macho_thread32 -{ - grub_uint32_t cmd; - grub_uint32_t cmdsize; - grub_uint8_t unknown1[48]; - grub_uint32_t entry_point; - grub_uint8_t unknown2[20]; -} GRUB_PACKED; - - -struct grub_macho_thread64 -{ - grub_uint32_t cmd; - grub_uint32_t cmdsize; - grub_uint8_t unknown1[0x88]; - grub_uint64_t entry_point; - grub_uint8_t unknown2[0x20]; -} GRUB_PACKED; - #endif diff --git a/include/grub/macho.h b/include/grub/macho.h index 3c88e71ca..2dea625f1 100644 --- a/include/grub/macho.h +++ b/include/grub/macho.h @@ -139,6 +139,24 @@ union grub_macho_filestart struct grub_macho_lzss_header lzss; } GRUB_PACKED; +struct grub_macho_thread32 +{ + grub_uint32_t cmd; + grub_uint32_t cmdsize; + grub_uint8_t unknown1[48]; + grub_uint32_t entry_point; + grub_uint8_t unknown2[20]; +} GRUB_PACKED; + +struct grub_macho_thread64 +{ + grub_uint32_t cmd; + grub_uint32_t cmdsize; + grub_uint8_t unknown1[0x88]; + grub_uint64_t entry_point; + grub_uint8_t unknown2[0x20]; +} GRUB_PACKED; + #define GRUB_MACHO_LZSS_OFFSET 0x180 grub_size_t