[PATCH] virhostcpu: Fix non-Linux virHostCPUGetPhysAddrSize() stub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The non-Linux version of virHostCPUGetPhysAddrSize() is lacking
G_GNUC_UNUSED attribute to its @size argument which triggers an
error on all non-Linux builds. And while at it, make the function
actually signal error (ENOSYS) since it does not set the
argument.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---

Pushed as build breaker fix.

 src/util/virhostcpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 3a02e224e8..54d0166b85 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -1672,9 +1672,10 @@ virHostCPUGetSignature(char **signature)
 }
 
 int
-virHostCPUGetPhysAddrSize(unsigned int *size)
+virHostCPUGetPhysAddrSize(unsigned int *size G_GNUC_UNUSED)
 {
-    return 0;
+    errno = ENOSYS;
+    return -1;
 }
 
 #endif /* __linux__ */
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux