2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-22 17:41:55 +00:00

[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

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>