Re: [libvirt] [PATCH] dnsmasqReload: avoid mingw link failure

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

 



2010/5/3 Eric Blake <eblake@xxxxxxxxxx>:
> * src/util/dnsmasq.c (dnsmasqReload): Mingw lacks kill, but is not
> running a dnsmasq daemon either.
> ---
>
> I'm not as familiar with the mingw cross-build setup, but I finally
> got enough pieces installed on my F-12 machine that this was the only
> remaining compilation failure that I ran into.  Let me know if we need
> an alternate patch that solves dnsmasq more gracefully than just
> crippling one function.

There's no dnsmasq to kill on Windows. I think this fix is fine.

>  src/util/dnsmasq.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/src/util/dnsmasq.c b/src/util/dnsmasq.c
> index 1cb5f21..d6cef40 100644
> --- a/src/util/dnsmasq.c
> +++ b/src/util/dnsmasq.c
> @@ -328,14 +328,16 @@ dnsmasqDelete(const dnsmasqContext *ctx)
>  * Reloads all the configurations associated to a context
>  */
>  int
> -dnsmasqReload(pid_t pid)
> +dnsmasqReload(pid_t pid ATTRIBUTE_UNUSED)
>  {
> +#ifndef __MINGW32__

Typically, WIN32 instead of __MINGW32__ is used in the libvirt code
base. Cygwin doesn't define WIN32, so this won't interfere with a
Cygwin build.

>     if (kill(pid, SIGHUP) != 0) {
>         virReportSystemError(errno,
>             _("Failed to make dnsmasq (PID: %d) reload config files.\n"),

You could kill the \n here.

>             pid);
>         return -1;
>     }
> +#endif /* __MINGW32__ */
>
>     return 0;
>  }
> --
> 1.6.6.1
>

ACK

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]