From: Michal Privoznik Date: Thu, 4 Aug 2022 08:27:56 +0000 (+0200) Subject: virhostcpu: Fix non-Linux virHostCPUGetPhysAddrSize() stub X-Git-Tag: v8.7.0-rc1~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=155416ed77120d2c5615b66fa8a96c36feb3f439;p=thirdparty%2Flibvirt.git virhostcpu: Fix non-Linux virHostCPUGetPhysAddrSize() stub 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 --- 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__ */