mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[efi] Do not rely on ProcessorBind.h when building host binaries
We cannot rely on the EDK2 ProcessorBind.h headers when compiling a binary for execution on the build host itself (e.g. elf2efi), since the host's CPU architecture may not even be supported by EDK2. Fix by skipping ProcessorBind.h when building a host binary, and defining the bare minimum required to allow other EDK2 headers to compile cleanly. Reported-by: Michal Suchánek <msuchanek@suse.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
#include <fcntl.h>
|
||||
#include <elf.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#define EFI_HOSTONLY
|
||||
#include <ipxe/efi/Uefi.h>
|
||||
#include <ipxe/efi/IndustryStandard/PeImage.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user