From nobody Sun May 5 14:56:47 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508827021078302.7129149625529; Mon, 23 Oct 2017 23:37:01 -0700 (PDT) Received: from localhost ([::1]:42102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6spa-0004wl-Fk for importer@patchew.org; Tue, 24 Oct 2017 02:36:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6soi-0004SB-KF for qemu-devel@nongnu.org; Tue, 24 Oct 2017 02:36:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6soe-0006qR-Mt for qemu-devel@nongnu.org; Tue, 24 Oct 2017 02:36:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49554) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6soe-0006q5-GR for qemu-devel@nongnu.org; Tue, 24 Oct 2017 02:35:56 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0FF8FC04AC59; Tue, 24 Oct 2017 06:35:55 +0000 (UTC) Received: from secure.mitica (ovpn-116-124.ams2.redhat.com [10.36.116.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 409F88384E; Tue, 24 Oct 2017 06:35:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0FF8FC04AC59 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=quintela@redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 24 Oct 2017 08:35:49 +0200 Message-Id: <20171024063550.22441-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 24 Oct 2017 06:35:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] tpm: Fix compilation with --disable-tpm X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, Amarnath Valluri , dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Commit c37cacabf2285b0731b44c1f667781fdd4f2b658 broke compilation without tpm. Just add an #ifdef CC: Amarnath Valluri Signed-off-by: Juan Quintela --- tpm.c | 6 +++++- vl.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tpm.c b/tpm.c index 45520f555d..e2f3be2e08 100644 --- a/tpm.c +++ b/tpm.c @@ -223,8 +223,11 @@ TPMInfoList *qmp_query_tpm(Error **errp) =20 TpmTypeList *qmp_query_tpm_types(Error **errp) { + TpmTypeList *head =3D NULL; + +#ifdef CONFIG_TPM unsigned int i =3D 0; - TpmTypeList *head =3D NULL, *prev =3D NULL, *cur_item; + TpmTypeList *prev =3D NULL, *cur_item; =20 for (i =3D 0; i < TPM_TYPE__MAX; i++) { if (!tpm_be_find_by_type(i)) { @@ -241,6 +244,7 @@ TpmTypeList *qmp_query_tpm_types(Error **errp) } prev =3D cur_item; } +#endif =20 return head; } diff --git a/vl.c b/vl.c index 0723835bbf..dbfd06d4bc 100644 --- a/vl.c +++ b/vl.c @@ -4905,7 +4905,9 @@ int main(int argc, char **argv, char **envp) res_free(); =20 /* vhost-user must be cleaned up before chardevs. */ +#ifdef CONFIG_TPM tpm_cleanup(); +#endif net_cleanup(); audio_cleanup(); monitor_cleanup(); --=20 2.13.6