[libvirt] [PATCH] small compilation problem with old dbus versions

Daniel Veillard veillard at redhat.com
Fri Dec 5 15:06:33 UTC 2008


On Fri, Dec 05, 2008 at 02:31:17PM +0000, Daniel P. Berrange wrote:
> On Fri, Dec 05, 2008 at 03:18:04PM +0100, Daniel Veillard wrote:
> > dbus_watch_get_unix_fd() was added in dbus >= 1.1.1, it deprecate
> > dbus_watch_get_fd(), so we should use the later if compiling against
> > the old stuff,
>   
> > -    info->watch = virEventAddHandle(dbus_watch_get_unix_fd(watch), flags,
> > -                                    dbus_watch_callback, watch, NULL);
> > +#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1) 
> 
> This conditional is rather painful to read. I think we'd be better
> off just explicitly checking for the function
> 
> In configure where we already have the HALL check 

  Sure, a bit easier to read, thanks ! commited,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list