diff options
| author | Michael Brown | 2009-03-31 08:32:16 +0200 |
|---|---|---|
| committer | Michael Brown | 2009-03-31 08:39:20 +0200 |
| commit | 7266aceb39beba3d24de96e47c2c05f3dbb70e77 (patch) | |
| tree | 38f1c8896c51a41eee484a230c16c1776c4c5964 /src | |
| parent | [build] Use __SIZE_TYPE__ macro in definition of size_t (diff) | |
| download | ipxe-7266aceb39beba3d24de96e47c2c05f3dbb70e77.tar.gz ipxe-7266aceb39beba3d24de96e47c2c05f3dbb70e77.tar.xz ipxe-7266aceb39beba3d24de96e47c2c05f3dbb70e77.zip | |
[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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/gpxe/efi/efi.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 <gpxe/efi/PiDxe.h> /* Reset any trailing #pragma pack directives */ +#pragma pack(1) #pragma pack() #include <gpxe/tables.h> |
