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