Re: Build error on OSX in src/util/virnetlink.c

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

 



On 03/06/2012 11:28 AM, Eric Blake wrote:
> On 03/06/2012 09:15 AM, Duncan Rance wrote:
>> Hi,
>>
>> I'm building on OSX with no libnl. I had to do this to get src/util/virnetlink.c to compile:
>>
>>
>>
>> diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
>> index 1575bad..59f3e39 100644
>> --- a/src/util/virnetlink.c
>> +++ b/src/util/virnetlink.c
>> @@ -545,9 +545,9 @@ int virNetlinkCommand(struct nl_msg *nl_msg ATTRIBUTE_UNUSED,
>>   */
>>  int virNetlinkEventServiceStop(void)
>>  {
>> +# if defined(__linux__) && !defined(HAVE_LIBNL)
>>      netlinkError(VIR_ERR_INTERNAL_ERROR,
>>                  "%s",
>> -# if defined(__linux__) && !defined(HAVE_LIBNL)
>>                  _("virNetlinkEventServiceStop is not supported since libnl was not available"));
> Oops - that's a blatant bug.  ACK and pushed.  I've also added you to
> AUTHORS; let me know if you prefer an alternate spelling.

That fix is actually a bit off - it ends up emitting no error log on
failure for non-linux systems. (Of course these functions should never
even be called on non-linux systems, so the difference is mostly
academic :-)

I made a more comprehensive patch for all the stub functions in
virnetlink.c that collapses all of the nearly-identical log messages and
eliminates the use of preprocessor directives within macro invocations
for those functions:

  https://www.redhat.com/archives/libvir-list/2012-March/msg00316.html

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