]> xenbits.xensource.com Git - libvirt.git/commitdiff
virhostcpu: Fix non-Linux virHostCPUGetPhysAddrSize() stub
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 4 Aug 2022 08:27:56 +0000 (10:27 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 4 Aug 2022 08:41:11 +0000 (10:41 +0200)
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@redhat.com>
src/util/virhostcpu.c

index 3a02e224e83af50e9e2f9ab0a21a9e091a677542..54d0166b854c3c29d6388a394fb7ccb980cfcf0c 100644 (file)
@@ -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__ */