You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.7 KiB
49 lines
1.7 KiB
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 06/10] 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 |
|
-- |
|
2.9.3 |
|
|
|
|