From 7266aceb39beba3d24de96e47c2c05f3dbb70e77 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 31 Mar 2009 07:32:16 +0100 Subject: [PATCH] [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 --- src/include/gpxe/efi/efi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/gpxe/efi/efi.h b/src/include/gpxe/efi/efi.h index a71a29e2..f4459b74 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