Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37857730
en ru br
ALT Linux repos
S:3.0.5-alt0.1

Group :: Development/Other
RPM: gnu-efi-3.0.5

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0006-Fix-typedef-of-EFI_PXE_BASE_CODE.patch
Download


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
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin