
On Tue, Jul 17, 2018 at 10:14:18AM +0200, Andrea Bolognani wrote:
On Sat, 2018-07-14 at 09:20 +0200, Michal Privoznik wrote:
The changelog is quite long because we haven't updated gnulib in a while. Anyway, among the new changes you'll find GCC 8 support, faster build time, mingw fixes and many others.
Ironically, this makes building on MinGW *worse* :)
[snip]
and after[2] it fails with
../../src/util/virrandom.c: In function 'virRandomInt': ../../src/util/virrandom.c:102:30: error: implicit declaration of function 'ffs' [-Werror=implicit-function-declaration] return virRandomBits(ffs(max) - 1); ^~~
If you tweak the code to get rid of the ffs() call, you'll see that the strncpy() error is not resolved - it's merely being swept under the rug by the new one.
It looks like gnulib commit 2afc250c6fae changed the ffs() detection code, and now when compiling with MinGW I get HAVE_FFS=1 instead of HAVE_FFS=0 and the failure above. Curiously, HAVE_FFS only shows up in Makefiles after the commit, whereas before I had the classic '#undef HAVE_FFS' in config.h as well.
CC'ing bug-gnulib and the patch author so they can take a look.
No need - I reported this yesterday & Bruno has already provided a fix which I've confirmed fixes the ffs() problem, so I've pushed that for libvirt. 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 :|