[libvirt] [PATCH] fix build erro when building with --without-libvirtd
Daniel P. Berrange
berrange at redhat.com
Mon Feb 4 11:43:12 UTC 2013
On Mon, Feb 04, 2013 at 12:25:48PM +0100, Martin Kletzander wrote:
> On 02/04/2013 09:23 AM, Hu Tao wrote:
> > ---
> > src/driver.h | 4 ---
> > src/libvirt.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++-
> > src/libvirt_internal.h | 2 --
> > 3 files changed, 69 insertions(+), 7 deletions(-)
> >
> > diff --git a/src/driver.h b/src/driver.h
> > index 02ddd83..dab7495 100644
> > --- a/src/driver.h
> > +++ b/src/driver.h
> > @@ -1512,7 +1512,6 @@ struct _virStorageDriver {
> > virDrvStoragePoolIsPersistent poolIsPersistent;
> > };
> >
> > -# ifdef WITH_LIBVIRTD
> >
> > typedef int (*virDrvStateInitialize) (bool privileged,
> > virStateInhibitCallback callback,
> > @@ -1531,7 +1530,6 @@ struct _virStateDriver {
> > virDrvStateReload reload;
> > virDrvStateStop stop;
> > };
> > -# endif
>
> Even though this is a solution and it makes the calls to virState* never
> fail during compilation, I see the other approach being used as well in
> some files (xen _driver.c for example):
>
> #ifdef WITH_LIBVIRTD
> if (virRegisterStateDriver(&state_driver) == -1) return -1;
> #endif
>
> I like this a bit more, but that's just a subjective opinion. However,
> if you go with your approach, I'd rather see it cleaning up those paths
> as well.
Agreed, pretty much all cases of 'WITH_LIBVIRTD' should be removed
from files under the src/ directory.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list