Re: [PATCH] atomic: mark header functions static

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

 



On 08/21/2012 01:55 PM, Eric Blake wrote:
> When gcc atomic intrinsics are not available (such as on RHEL 5
> with gcc 4.1.2), we were getting link errors due to multiple
> definitions:
> 
> ./.libs/libvirt_util.a(libvirt_util_la-virobject.o): In function `virAtomicIntXor':
> /home/dummy/l,ibvirt/src/util/viratomoic.h:404: multiple definition of `virAtomicIntXor'
> ./.libs/libvirt_util.a(libvirt_util_la-viratomic.o):/home/dummy/libvirt/src/util/viratomic.h:404: first defined here
> 
> Solve this by conditionally marking the functions static (the
> condition avoids falling foul of gcc warnings about unused
> static function declarations).
> 
> * src/util/viratomic.h: When not using gcc intrinsics, use static
> functions to avoid linker errors on duplicate functions.
> ---
> 
> Pushing under the build-breaker rule.  Tested on both RHEL 5
> and modern gcc of F17.

I meant to send this as patch 4/1 in the series of RHEL 5 cleanups:
https://www.redhat.com/archives/libvir-list/2012-August/msg01383.html

> 
> Oh, and I just noticed my indentation is off, while preparing
> this email; I'll squash in the whitespace fix before pushing.

Except I forgot to amend before pushing, so it turned into two patches.
 Oh well.

-- 
Eric Blake   eblake@xxxxxxxxxx    +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]