[libvirt] [PATCH] util: Fix virpci compilation on non-Linux

Andrea Bolognani posted 1 patch 5 years, 5 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20181115150048.12618-1-abologna@redhat.com
src/util/virpci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] util: Fix virpci compilation on non-Linux
Posted by Andrea Bolognani 5 years, 5 months ago
We were mistakenly skipping virZPCIDeviceAddressIsEmpty() and
virZPCIDeviceAddressIsValid() when compiling on non-Linux,
which unsurprisingly ended up causing linking failures later
in the build process.

Clue-stick-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
Pushed as build fix.

 src/util/virpci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index efa2d1662a..66aae60baa 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2561,7 +2561,6 @@ virPCIDeviceAddressParse(char *address,
     return ret;
 }
 
-#ifdef __linux__
 
 bool
 virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr zpci)
@@ -2588,6 +2587,7 @@ virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr)
     return !(addr->uid || addr->fid);
 }
 
+#ifdef __linux__
 
 /*
  * returns true if equal
-- 
2.19.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list