]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: avoid requiring -lm
authorEric Blake <eblake@redhat.com>
Mon, 11 Jul 2011 23:22:20 +0000 (17:22 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 11 Jul 2011 23:32:11 +0000 (17:32 -0600)
commitdf94811f7165fbb78b5f8a10360664c1bd23d7d1
tree047dea94551917f79bbb8b2ff9801b542d2dce6a
parent00d3c5a6032e69a3c853380ca2d8b0764d15e306
build: avoid requiring -lm

log2() is heavy when ffs() can do the same thing.  But ffs()
requires gnulib support for mingw.

This patch solves this linker error on Fedora 14.

/usr/bin/ld: libvirt_lxc-domain_conf.o: undefined reference to symbol 'log2@@GLIBC_2.2.5'
/usr/bin/ld: note: 'log2@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
/lib64/libm.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

* .gnulib: Update to latest, for ffs.
* bootstrap.conf (gnulib_modules): Import ffs.
* src/conf/domain_conf.c (virDomainDefParseXML): Use ffs instead
of log2.
Reported by Dave Allan.
.gnulib
bootstrap.conf
src/conf/domain_conf.c