Re: [PATCH] util: avoid symbol clash between json libraries

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

 



On Tue, Jul 31, 2018 at 06:07:20PM +0200, Ján Tomko wrote:
> On Tue, Jul 31, 2018 at 03:55:28PM +0100, Daniel P. Berrangé wrote:
> > The jansson and json-glib libraries both export symbols with a json_
> > name prefix and json_object_iter_next() clashes between them.
> > 
> > Unfortunately json_glib is linked in by GTK, so any app using GTK and
> 
> json-glib

Not fixed in v2, but fixed in my local copy now.

> > +#include <config.h>
> > +
> > +#include "virthread.h"
> > +#include "virerror.h"
> 
> > +#define VIR_JSON_COMPAT_IMPL
> > +#include "virjsoncompat.h"
> 
> virjsoncompat.h includes jansson.h unconditionally, so this fails to
> compile on a machine without jansson-devel:
> In file included from util/virjsoncompat.c:27:
> util/virjsoncompat.h:56:10: fatal error: jansson.h: No such file or directory
> #include <jansson.h>
>          ^~~~~~~~~~~

I've rearranged things and tested a mingw build now so this should
be ok in v2.

> > +#define LOAD(name) \
> > +    do { \
> > +        if (!(name ## _ptr = dlsym(handle, #name))) {                  \
> > +            virReportError(VIR_ERR_NO_SUPPORT,                          \
> > +                           _("missing symbol '%s' in libjansson.so.4: %s"), #name, dlerror()); \
> > +            goto error;                                                 \
> 
> If you do
>  return -1;
> you can drop the error label.

Yes ok




Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

  Powered by Linux