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