Re: [libvirt] Fix for newer yajl
On 27/07/2011 10:24, Brecht Sanders wrote: Hi, I just notices that compiling libvirt against yail version 2 there were some errors, mainly because yajl_parser_config is no longer used. What version of libvirt is your patch against ? The latest releases already have fixed compatibility with YAJL 2, so I'm assuming you have an old release ? Regards, Daniel Hmm, you're right. My bad. I forgot I was compiling 0.9.0 because I had other issues compiling later versions under MinGW/MSYS on Windows. In case you were not aware of this I'm including the end of my 0.9.3 output below. Please ignore my previous mail. I just noticed this was caused by "-Dsiginfo_t=int" which I still had in there to fix older compiles. Removing this works fine. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] Fix for newer yajl
Hi, I just notices that compiling libvirt against yail version 2 there were some errors, mainly because yajl_parser_config is no longer used. What version of libvirt is your patch against ? The latest releases already have fixed compatibility with YAJL 2, so I'm assuming you have an old release ? Regards, Daniel Hmm, you're right. My bad. I forgot I was compiling 0.9.0 because I had other issues compiling later versions under MinGW/MSYS on Windows. In case you were not aware of this I'm including the end of my 0.9.3 output below. libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../src/util -I../include -DIN_LIBVIRT -I/custombuilt32/include/libxml2 -Wall -W -Wformat-y2k -Wformat-security -Winit-self -Wmissing-include-dirs -Wunused -Wunknown-pragmas -Wstrict-aliasing -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Winline -Winvalid-pch -Wvolatile-register-var -Wdisabled-optimization -Wbuiltin-macro-redefined -Wmudflap -Wpacked-bitfield-compat -Wsync-nand -Wattributes -Wcoverage-mismatch -Wmultichar -Wno-missing-field-initializers -Wno-sign-compare -Wjump-misses-init -Wframe-larger-than=4096 -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option -funit-at-a-time -Drestrict=__restrict -DWSAAPI -Dsiginfo_t=int -MT libvirt_net_rpc_server_la-virnetserver.lo -MD -MP -MF .deps/libvirt_net_rpc_server_la-virnetserver.Tpo -c rpc/virnetserver.c -DDLL_EXPORT -DPIC -o .libs/libvirt_net_rpc_server_la-virnetserver.o rpc/virnetserver.c: In function 'virNetServerSignalHandler': rpc/virnetserver.c:392:12: error: request for member 'si_signo' in something not a structure or union rpc/virnetserver.c: In function 'virNetServerSignalEvent': rpc/virnetserver.c:423:20: error: request for member 'si_signo' in something not a structure or union rpc/virnetserver.c:432:5: error: request for member 'si_signo' in something not a structure or union make[3]: *** [libvirt_net_rpc_server_la-virnetserver.lo] Error 1 make[3]: Leaving directory `/home/win32/libvirt-0.9.3/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/win32/libvirt-0.9.3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/win32/libvirt-0.9.3' make: *** [all] Error 2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] Fix for newer yajl
On Wed, Jul 27, 2011 at 09:40:47AM +0200, Brecht Sanders wrote: > Hi, > I just notices that compiling libvirt against yail version 2 there > were some errors, mainly because yajl_parser_config is no longer > used. What version of libvirt is your patch against ? The latest releases already have fixed compatibility with YAJL 2, so I'm assuming you have an old release ? Regards, 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 :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] Fix for newer yajl
Hi, I just notices that compiling libvirt against yail version 2 there were some errors, mainly because yajl_parser_config is no longer used. The patch below fixed this for me. Regards Brecht Sanders --- src/util/json.c 2011-03-24 08:10:26 +0100 +++ src/util/json.c 2011-07-27 09:29:52 +0200 @@ -34,2 +34,3 @@ # include +# include #endif @@ -896,3 +897,5 @@ { +#if YAJL_MAJOR < 2 yajl_parser_config cfg = { 1, 1 }; +#endif yajl_handle hand; @@ -903,3 +906,7 @@ +#if YAJL_MAJOR < 2 hand = yajl_alloc(&parserCallbacks, &cfg, NULL, &parser); +#else +hand = yajl_alloc(&parserCallbacks, NULL, &parser); +#endif @@ -1004,3 +1011,5 @@ { +#if YAJL_MAJOR < 2 yajl_gen_config conf = { 0, " " }; /* Turns off pretty printing since QEMUcan't cope */ +#endif yajl_gen g; @@ -1012,3 +1021,7 @@ +#if YAJL_MAJOR < 2 g = yajl_gen_alloc(&conf, NULL); +#else +g = yajl_gen_alloc(NULL); +#endif -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list