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