From: Michael Brown Date: Tue, 31 Mar 2009 06:32:16 +0000 (+0100) Subject: [efi] Fix compilation on Mac OS X. X-Git-Tag: v0.9.8~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7266aceb39beba3d24de96e47c2c05f3dbb70e77;p=thirdparty%2Fipxe.git [efi] Fix compilation on Mac OS X. The Mac compiler treats "#pragma pack()" as gcc's "#pragma pack(pop)", and so dies if the pragma pack stack is empty. Adding a "#pragma pack(1)" immediately beforehand is enough to keep the Mac compiler happy. The combination of "#pragma pack(1)", "#pragma pack()" won't actually achieve anything on a Mac, but it will at least build. (With gcc, the "#pragma pack()" overrides any previous pragmas, so is still useful.) Suggested-by: Joshua Oreman --- diff --git a/src/include/gpxe/efi/efi.h b/src/include/gpxe/efi/efi.h index a71a29e27..f4459b747 100644 --- a/src/include/gpxe/efi/efi.h +++ b/src/include/gpxe/efi/efi.h @@ -41,6 +41,7 @@ #include /* Reset any trailing #pragma pack directives */ +#pragma pack(1) #pragma pack() #include