瀏覽代碼

[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 年之前
父節點
當前提交
7266aceb39
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      src/include/gpxe/efi/efi.h

+ 1
- 0
src/include/gpxe/efi/efi.h 查看文件

@@ -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>

Loading…
取消
儲存