98d7c11
From 28b487d1ae66c7311e13c07c802276ea26f026e9 Mon Sep 17 00:00:00 2001
5e28aef
From: Peter Jones <pjones@redhat.com>
98d7c11
Date: Tue, 13 Mar 2018 15:20:25 -0400
98d7c11
Subject: [PATCH 15/25] Fix typedef of EFI_PXE_BASE_CODE
5e28aef
5e28aef
Commit 751cbce3 fixed up a bunch of types to better match the edk2
5e28aef
definitions and the names in the UEFI Spec, but while doing so
5e28aef
inadvertantly defined things thusly:
5e28aef
5e28aef
  INTERFACE_DECL(_EFI_PXE_BASE_CODE_PROTOCOL);
5e28aef
  ...
5e28aef
  typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
5e28aef
  ...
5e28aef
  } EFI_PXE_BASE_CODE_PROTOCOL;
5e28aef
  ...
5e28aef
  typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
5e28aef
  typedef struct EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
5e28aef
5e28aef
Because EFI_BASE_CODE_PROTOCOL is declared with a typedef, and is
5e28aef
therefore in the type namespace rather than the struct namespace, this
5e28aef
results in EFI_PXE_BASE_CODE being a forward declaration of an
5e28aef
incomplete type.  The net result is that code which dereferences any
5e28aef
field in the struct, even with the correct names, will not correctly
5e28aef
build.
5e28aef
5e28aef
This patch changes both _EFI_PXE_BASE_CODE and EFI_PXE_BASE_CODE
5e28aef
typedefs to inherit from struct _EFI_PXE_BASE_CODE_PROTOCOL.
5e28aef
5e28aef
Signed-off-by: Peter Jones <pjones@redhat.com>
98d7c11
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
5e28aef
---
5e28aef
 inc/efipxebc.h | 2 +-
5e28aef
 1 file changed, 1 insertion(+), 1 deletion(-)
5e28aef
5e28aef
diff --git a/inc/efipxebc.h b/inc/efipxebc.h
f458757
index 035a853a7ef..3760c7cbb78 100644
5e28aef
--- a/inc/efipxebc.h
5e28aef
+++ b/inc/efipxebc.h
5e28aef
@@ -419,7 +419,7 @@ typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
5e28aef
 // Use 'EFI_PXE_BASE_CODE_PROTOCOL_GUID' instead.
5e28aef
 
5e28aef
 typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
f458757
-typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
5e28aef
+typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
5e28aef
 
5e28aef
 //
5e28aef
 // Call Back Definitions
5e28aef
-- 
98d7c11
2.15.0
5e28aef