blob: e39cd084b3a3e6abe8bd19c1d2c9cc8c756aa7f9 (
plain)
1 https://github.com/vathpela/gnu-efi/commit/e4ca94374c7ece8ec0100075710af8638e42c203
2
3 From e4ca94374c7ece8ec0100075710af8638e42c203 Mon Sep 17 00:00:00 2001
4 From: Peter Jones <pjones@redhat.com>
5 Date: Wed, 8 Feb 2017 15:28:18 -0500
6 Subject: [PATCH] Fix typedef of EFI_PXE_BASE_CODE
7
8 Commit 751cbce3 fixed up a bunch of types to better match the edk2
9 definitions and the names in the UEFI Spec, but while doing so
10 inadvertantly defined things thusly:
11
12 INTERFACE_DECL(_EFI_PXE_BASE_CODE_PROTOCOL);
13 ...
14 typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
15 ...
16 } EFI_PXE_BASE_CODE_PROTOCOL;
17 ...
18 typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
19 typedef struct EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
20
21 Because EFI_BASE_CODE_PROTOCOL is declared with a typedef, and is
22 therefore in the type namespace rather than the struct namespace, this
23 results in EFI_PXE_BASE_CODE being a forward declaration of an
24 incomplete type. The net result is that code which dereferences any
25 field in the struct, even with the correct names, will not correctly
26 build.
27
28 This patch changes both _EFI_PXE_BASE_CODE and EFI_PXE_BASE_CODE
29 typedefs to inherit from struct _EFI_PXE_BASE_CODE_PROTOCOL.
30
31 Signed-off-by: Peter Jones <pjones@redhat.com>
32 ---
33 inc/efipxebc.h | 2 +-
34 1 file changed, 1 insertion(+), 1 deletion(-)
35
36 diff --git a/inc/efipxebc.h b/inc/efipxebc.h
37 index 580a6ef..3760c7c 100644
38 --- a/inc/efipxebc.h
39 +++ b/inc/efipxebc.h
40 @@ -419,7 +419,7 @@ typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
41 // Use 'EFI_PXE_BASE_CODE_PROTOCOL_GUID' instead.
42
43 typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
44 -typedef struct EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
45 +typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
46
47 //
48 // Call Back Definitions
|