david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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 <oremanj@rwcr.net>
This commit is contained in:
Michael Brown 2009-03-31 07:32:16 +01:00
parent 820b11dc0a
commit 7266aceb39
1 changed files with 1 additions and 0 deletions

View File

@ -41,6 +41,7 @@
#include <gpxe/efi/PiDxe.h>
/* Reset any trailing #pragma pack directives */
#pragma pack(1)
#pragma pack()
#include <gpxe/tables.h>