Bladeren bron

[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>
tags/v0.9.8
Michael Brown 15 jaren geleden
bovenliggende
commit
7266aceb39
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. 1
    0
      src/include/gpxe/efi/efi.h

+ 1
- 0
src/include/gpxe/efi/efi.h Bestand weergeven

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

Laden…
Annuleren
Opslaan