mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-10 23:45:53 -06:00
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.
This commit is contained in:
parent
00d3c5a603
commit
df94811f71
2
.gnulib
2
.gnulib
@ -1 +1 @@
|
||||
Subproject commit 56005a21e8f9f434212a19dcb628c6d3b179fd08
|
||||
Subproject commit a918da4d61d28be61a12605c9d35e2cf3966d866
|
@ -36,6 +36,7 @@ count-one-bits
|
||||
crypto/md5
|
||||
dirname-lgpl
|
||||
fcntl-h
|
||||
ffs
|
||||
fnmatch
|
||||
func
|
||||
getaddrinfo
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/time.h>
|
||||
#include <math.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "virterror_internal.h"
|
||||
#include "datatypes.h"
|
||||
@ -5865,7 +5865,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
|
||||
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unexpected domain type %s, expecting %s"),
|
||||
virDomainVirtTypeToString(def->virtType),
|
||||
virDomainVirtTypeToString(log2(expectedVirtTypes)));
|
||||
virDomainVirtTypeToString(ffs(expectedVirtTypes) - 1));
|
||||
} else {
|
||||
virBuffer buffer = VIR_BUFFER_INITIALIZER;
|
||||
char *string;
|
||||
|
Loading…
Reference in New Issue
Block a user