On 11/19/14 17:30, Scott Duplichan wrote:
> OvmfPkg: Fix build failure with gcc44, gcc45:
>     OvmfPkg/XenBusDxe/XenHypercall.h:19:31: error: redefinition of typedef 
> 'XENBUS_DEVICE'
>     OvmfPkg/XenBusDxe/XenBusDxe.h:86:31: note: previous declaration of 
> 'XENBUS_DEVICE' was here
> 
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Scott Duplichan <sc...@notabs.org>
> ---
> 
> Index: OvmfPkg/XenBusDxe/XenHypercall.h
> ===================================================================
> --- OvmfPkg/XenBusDxe/XenHypercall.h  (revision 16406)
> +++ OvmfPkg/XenBusDxe/XenHypercall.h  (working copy)
> @@ -16,8 +16,6 @@
>  #ifndef __XENBUS_DXE_HYPERCALL_H__
>  #define __XENBUS_DXE_HYPERCALL_H__
>  
> -typedef struct _XENBUS_DEVICE XENBUS_DEVICE;
> -
>  /**
>    This function will put the two arguments in the right place (registers) and
>    call HypercallAddr, which correspond to an entry in the hypercall pages.
> 
> 

Neither of "XenHypercall.h" and "XenBusDxe.h" includes the other,
therefore whichever header file loses the typedef will cause .c files to
break that depend solely on that header file.

The solution would be to include one of the header files by the other
(so that each header file could be included by any .c file in
isolation), or to extract a separate header file with the commonly used
typedef.

But, I'm beyond caring; any file that includes XenHypercall.h includes
XenBusDxe.h first (as displayed by the gcc error message too):
- EventChannel.c: via EventChannel.h
- GrantTable.c: directly
- XenBusDxe.c: directly
- XenHypercall.c: directly
- XenStore.c: via XenStore.h

... Your patch (from the attachment) has LF line endings; they should be
CRLF. But I can fix that up for you.

Acked-by: Laszlo Ersek <ler...@redhat.com>

Committed as r16408.

Laszlo

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to