Re: [PATCH] Fix undefined symbol error when macvtap support is disabled

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

 



2010/12/1 Eric Blake <eblake@xxxxxxxxxx>:
> On 12/01/2010 08:34 AM, Matthias Bolte wrote:
>> Use macvtap specific functions depending on WITH_MACVTAP.
>>
>> Use #if instead of #ifdef to check for WITH_MACVTAP, because
>> WITH_MACVTAP is always defined with value 0 or 1.
>
> That, and #if undefined behaves the same as #if defined_as_0.
>
>>
>> Also export virVMOperationType{To|From}String unconditional,
>> because they are used unconditional in the domain config code.
>> ---
>> Âsrc/libvirt_macvtap.syms | Â Â5 +++--
>> Âsrc/libvirt_private.syms | Â Â5 +++++
>> Âsrc/qemu/qemu_driver.c  |  Â4 ++++
>> Âsrc/util/macvtap.h    |  19 +++++++++----------
>> Â4 files changed, 21 insertions(+), 12 deletions(-)
>
> ACK.
>
>> +++ b/src/qemu/qemu_driver.c
>> @@ -11879,6 +11879,7 @@ cleanup:
>> Â Â Âreturn ret;
>> Â}
>>
>> +#if WITH_MACVTAP
>> Âstatic void
>> ÂqemudVPAssociatePortProfiles(virDomainDefPtr def) {
>> Â Â Âint i;
>> @@ -11913,6 +11914,7 @@ err_exit:
>> Â Â Â Â Â}
>> Â Â Â}
>> Â}
>> +#endif /* WITH_MACVTAP */
>
> I would have done:
>
> #else /* !WITH_MACVTAP */
> # define qemudVPAssociatePortProfiles(ignored) /* */
> #endif
>

Okay, I folded this in before pushing as discussed on IRC:

#else /* !WITH_MACVTAP */
static void
qemudVPAssociatePortProfiles(virDomainDefPtr def ATTRIBUTE_UNUSED) { }
#endif

Matthias

--
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]