]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
util: fix build error on non-Linux systems
authorLaine Stump <laine@laine.org>
Fri, 28 Jun 2013 08:00:54 +0000 (04:00 -0400)
committerLaine Stump <laine@laine.org>
Fri, 28 Jun 2013 08:09:42 +0000 (04:09 -0400)
commita757822233f707c4ed75986f5903e26e40f3cdfa
tree57d805608ea362ad207cf0e7352280f2e1344a90
parentb291a00acaddca9047ba06fdf3d9bde570fb95fa
util: fix build error on non-Linux systems

Building on FreeBSD had this linker error:

/work/a/ports/devel/libvirt/work/libvirt-1.1.0/src/.libs/libvirt.so:
   undefined reference to `virPCIDeviceAddressParse'

This was caused by the new use of virPCIDeviceAddressParse in a
portion of virpci.c that wasn't linux-only (in commit 72c029d8). The
problem was that virPCIDeviceAddressParse had originally been defined
inside #ifdef _linux (because it was only used by another function
that was inside the same ifdef).

The solution is to move it out to the part of virpci.c that is
compiled on all platforms.

(Because the portion that was "moved" was 40-50 lines, but only moved
up by 15 lines, the diff for the patch is less than non-informative -
rather than showing that part that I moved, it shows the bit that was
previously before the moved part, and now sits *after* it.)
src/util/virpci.c