From nobody Mon May 6 07:50:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1626949469; cv=none; d=zohomail.com; s=zohoarc; b=EXvd3s8X5yErRRrONkeMuLzQAewApSSHWyJfFAMYRf1BKTEIu8+s2ptiHOvurGePIAaToUExW0RDtWKhLAftY8hBd+mMx/Soa882DZaGIk7PsLyPXfpLUKNnmnDFQARU69KcsAOw83HErlHIdPSiAJ+SsmsEHGIEX3KIdl3bXow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626949469; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=sWDxELPnQnLqrA9OWX88j2CMCuvljxQ0B8/m/GkQyOM=; b=lFAdRiOW4TZqQp2Cenn0sd3VQdJLE3HtkFnUvu1tIiK627WdVBgHNslPAwwVwFvl3hlX25f78az4MhNXKmvj8HxD5OQFGmGSNcBi+OpbuY7WpgIHth+7oKtXUX1nyq/+P315sLSL4C4UMjjKtGj1O/hfEJz5yzT7HEY3Q+tOt7E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626949469812521.7295614105544; Thu, 22 Jul 2021 03:24:29 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-47-bcAbEwHxOFGCp3LMzXhtlQ-1; Thu, 22 Jul 2021 06:24:26 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 874D93E745; Thu, 22 Jul 2021 10:24:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9FAEB5D9DD; Thu, 22 Jul 2021 10:24:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 468AA180BAB1; Thu, 22 Jul 2021 10:24:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16MAOEUI023823 for ; Thu, 22 Jul 2021 06:24:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 95FF41962F; Thu, 22 Jul 2021 10:24:14 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.192.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13EC460BD8 for ; Thu, 22 Jul 2021 10:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626949468; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sWDxELPnQnLqrA9OWX88j2CMCuvljxQ0B8/m/GkQyOM=; b=d1Q5sWw961NIWJ0iQiyXEK4nt9jDmH81SpKwPSYO4MFrbR/jAli5WOWu1i6+i5md6b15P0 sH7qPG4kzDxUDJ2j71UUT9FmVhaEkGrgBvnZxagE2zKtgA7MxirSDsV7W2jhHVtSqkIZi+ BTTEIkPAdYXYzqdtIXVZ0Xr8zAwe9dA= X-MC-Unique: bcAbEwHxOFGCp3LMzXhtlQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH] tests: fix compiling tests with minGW Date: Thu, 22 Jul 2021 12:24:09 +0200 Message-Id: <0e69502b1816e50c2ee33155789f7d53d136147d.1626949422.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626949471817100001 Content-Type: text/plain; charset="utf-8" We need to mock virQEMUCapsGetKVMSupportsSecureGuest only if compiling with QEMU otherwise compilation will fail with error: /usr/lib/gcc/i686-w64-mingw32/11.1.1/../../../../i686-w64-mingw32/bin/ld: t= ests/libdomaincapsmock.dll.p/domaincapsmock.c.obj: in function `virQEMUCaps= GetKVMSupportsSecureGuest': /builds/libvirt/libvirt/build/../tests/domaincapsmock.c:40: undefined refer= ence to `virQEMUCapsGet' /usr/lib/gcc/i686-w64-mingw32/11.1.1/../../../../i686-w64-mingw32/bin/ld: /= builds/libvirt/libvirt/build/../tests/domaincapsmock.c:41: undefined refere= nce to `virQEMUCapsGet' Fixes: 248a30c0c0ec2610e8fa2bbbc98da6d06978ad2e Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik --- tests/domaincapsmock.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/domaincapsmock.c b/tests/domaincapsmock.c index 7b02c0e890..0a6c541f77 100644 --- a/tests/domaincapsmock.c +++ b/tests/domaincapsmock.c @@ -17,8 +17,11 @@ #include =20 #include "virhostcpu.h" -#include "virmock.h" -#include "qemu/qemu_capabilities.h" + +#if WITH_QEMU +# include "virmock.h" +# include "qemu/qemu_capabilities.h" +#endif =20 int virHostCPUGetKVMMaxVCPUs(void) @@ -32,6 +35,7 @@ virHostCPUGetMicrocodeVersion(virArch hostArch G_GNUC_UNU= SED) return 0; } =20 +#if WITH_QEMU static bool (*real_virQEMUCapsGetKVMSupportsSecureGuest)(virQEMUCaps *qemu= Caps); =20 bool @@ -46,3 +50,4 @@ virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCap= s) =20 return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps); } +#endif --=20 2.31.1