]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
build: fix building error when building without libvirtd
authorWen Congyang <wency@cn.fujitsu.com>
Mon, 20 Jun 2011 02:48:07 +0000 (10:48 +0800)
committerWen Congyang <wency@cn.fujitsu.com>
Mon, 20 Jun 2011 07:52:11 +0000 (15:52 +0800)
commit34e3ec90f69b419bae95f52f1f914f1adac5ed65
treeb240be43853f9c5c0e53c54fe35530de7ecec757
parentb9757fea30785a92aa95ea675b9bc371e4fb2e8c
build: fix building error when building without libvirtd

When building libvirt without libvirtd, we will receive the following error
message:

make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/tools'
  CC     virsh-virsh.o
  CC     virsh-console.o
  GEN    virt-xml-validate
  GEN    virt-pki-validate
  CCLD   virsh
./src/.libs/libvirt.so: undefined reference to `numa_available'
./src/.libs/libvirt.so: undefined reference to `numa_max_node'
collect2: ld returned 1 exit status

The reason is that: we check numactl only when building qemu driver, and qemu
driver will not be built when bulding without libvirtd. So with_numactl's
value is check and we will not link libnuma.so.

In the other function, we call numa_available() and numa_max_node() only
when HAVE_NUMACTL is 1. We should do the same check in the function nodeGetMemoryStats().
src/nodeinfo.c