Re: [PATCH] Fix build with older GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Roman Bogorodskiy wrote:

> Build with older gcc fails with:
> 
>   CC       libosinfo_1_0_la-osinfo_avatar_format.lo
> In file included from ../osinfo/osinfo_os.h:30,
>                  from ../osinfo/osinfo.h:55,
>                  from osinfo_avatar_format.c:28:
> ../osinfo/osinfo_media.h:68: error: redefinition of typedef 'OsinfoMedia'
> ../osinfo/osinfo_install_script.h:43: error: previous declaration of 'OsinfoMedia' was here
> 
> To avoid redefinition, use forward-declaration in a similar way
> like it's done for OsinfoOs in osinfo/osinfo_os.h.

ping

> ---
>  osinfo/osinfo_media.h | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/osinfo/osinfo_media.h b/osinfo/osinfo_media.h
> index 8ad39c4..09fbacd 100644
> --- a/osinfo/osinfo_media.h
> +++ b/osinfo/osinfo_media.h
> @@ -65,8 +65,11 @@ typedef enum {
>  #define OSINFO_IS_MEDIA_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), OSINFO_TYPE_MEDIA))
>  #define OSINFO_MEDIA_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), OSINFO_TYPE_MEDIA, OsinfoMediaClass))
>  
> -typedef struct _OsinfoMedia        OsinfoMedia;
> -
> +/*
> + * Forward declared in osinfo_install_script.h
> + *
> + * typedef struct _OsinfoMedia        OsinfoMedia;
> + */
>  typedef struct _OsinfoMediaClass   OsinfoMediaClass;
>  
>  typedef struct _OsinfoMediaPrivate OsinfoMediaPrivate;
> -- 
> 2.4.6
> 

Roman Bogorodskiy

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux