Re: [resend] fix libvirt alignment on arm platforms

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

 



On 12/12/2013 10:05 AM, Michele Paolino wrote:
> With the changes added by the latest commits (e.g.
> 8a29ffcf9aee45b61a0a12ee45c656cfd52333e8) related to "new events feature
> v2",
> we are unable to compile libvirt on ARM target (OMAP5).
> The error is due to alignment:
> conf/domain_event.c: In function 'virDomainEventDispatchDefaultFunc':
> conf/domain_event.c:1198:30: error: cast increases required alignment of
> target type [-Werror=cast-align]
> conf/domain_event.c:1314:34: error: cast increases required alignment of
> target type [-Werror=cast-align]
> cc1: all warnings being treated as errors
> 
> Using ATTRIBUTE_PACKED we force a structure to not follow architecture and
> compiler best alignments.

NACK; I'd rather go with the union approach, because ATTRIBUTE_PACKED
risks putting things on non-clean boundaries which may then interfere
with attempts to do atomic operations on fields that a subclass may add.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

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