49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
https://github.com/vathpela/gnu-efi/commit/e4ca94374c7ece8ec0100075710af8638e42c203
|
|
|
|
From e4ca94374c7ece8ec0100075710af8638e42c203 Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Wed, 8 Feb 2017 15:28:18 -0500
|
|
Subject: [PATCH] Fix typedef of EFI_PXE_BASE_CODE
|
|
|
|
Commit 751cbce3 fixed up a bunch of types to better match the edk2
|
|
definitions and the names in the UEFI Spec, but while doing so
|
|
inadvertantly defined things thusly:
|
|
|
|
INTERFACE_DECL(_EFI_PXE_BASE_CODE_PROTOCOL);
|
|
...
|
|
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
|
|
...
|
|
} EFI_PXE_BASE_CODE_PROTOCOL;
|
|
...
|
|
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
|
|
typedef struct EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
|
|
|
|
Because EFI_BASE_CODE_PROTOCOL is declared with a typedef, and is
|
|
therefore in the type namespace rather than the struct namespace, this
|
|
results in EFI_PXE_BASE_CODE being a forward declaration of an
|
|
incomplete type. The net result is that code which dereferences any
|
|
field in the struct, even with the correct names, will not correctly
|
|
build.
|
|
|
|
This patch changes both _EFI_PXE_BASE_CODE and EFI_PXE_BASE_CODE
|
|
typedefs to inherit from struct _EFI_PXE_BASE_CODE_PROTOCOL.
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
---
|
|
inc/efipxebc.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/inc/efipxebc.h b/inc/efipxebc.h
|
|
index 580a6ef..3760c7c 100644
|
|
--- a/inc/efipxebc.h
|
|
+++ b/inc/efipxebc.h
|
|
@@ -419,7 +419,7 @@ typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
|
|
// Use 'EFI_PXE_BASE_CODE_PROTOCOL_GUID' instead.
|
|
|
|
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
|
|
-typedef struct EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
|
|
+typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
|
|
|
|
//
|
|
// Call Back Definitions
|