Re: [PATCH] virnetlink: fix build on non-Linux

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

 



Hi Eric,

On Mon, 2015-01-05 at 15:13 -0700, Eric Blake wrote:
> Commit 4dc04d3a added virNetlinkGetErrorCode, but forgot to provide
> a fallback, which kills the build on mingw (among others):
> 
>   CCLD     libvirt.la
>   Cannot export virNetlinkGetErrorCode: symbol not defined
>   collect2: error: ld returned 1 exit status
> 
> * src/util/virnetlink.c (virNetlinkGetErrorCode): Provide fallback.

Oh indeed! I missed that one. Thanks for taking care of it.

--
Cedric

> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
> 
> Pushing under the build-breaker rule.
> 
>  src/util/virnetlink.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
> index 1a2b7a1..d52f66a 100644
> --- a/src/util/virnetlink.c
> +++ b/src/util/virnetlink.c
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (C) 2010-2014 Red Hat, Inc.
> + * Copyright (C) 2010-2015 Red Hat, Inc.
>   * Copyright (C) 2010-2012 IBM Corporation
>   *
>   * This library is free software; you can redistribute it and/or
> @@ -276,7 +276,9 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
>      return ret;
>  }
> 
> -int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
> +
> +int
> +virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
>  {
>      struct nlmsgerr *err;
>      int result = 0;
> @@ -314,6 +316,7 @@ int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
>      return -EINVAL;
>  }
> 
> +
>  static void
>  virNetlinkEventServerLock(virNetlinkEventSrvPrivatePtr driver)
>  {
> @@ -872,4 +875,13 @@ int virNetlinkEventRemoveClient(int watch ATTRIBUTE_UNUSED,
>      return -1;
>  }
> 
> +
> +int
> +virNetlinkGetErrorCode(struct nlmsghdr *resp ATTRIBUTE_UNUSED,
> +                       unsigned int recvbuflen ATTRIBUTE_UNUSED)
> +{
> +    virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
> +    return -EINVAL;
> +}
> +
>  #endif /* __linux__ */


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