From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzmXT-0007Rs-LM for qemu-devel@nongnu.org; Tue, 02 Jun 2015 09:47:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzmXL-0002B9-Iu for qemu-devel@nongnu.org; Tue, 02 Jun 2015 09:47:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzmXL-0002B4-E9 for qemu-devel@nongnu.org; Tue, 02 Jun 2015 09:47:23 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 10A4719F241 for ; Tue, 2 Jun 2015 13:47:23 +0000 (UTC) From: Juan Quintela Date: Tue, 2 Jun 2015 15:47:20 +0200 Message-Id: <1433252840-1681-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH] TPM: fix build with tpm disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Failure was included on commit Signed-off-by: Juan Quintela --- include/sysemu/tpm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index c143890..c8afa17 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -32,11 +32,13 @@ TPMVersion tpm_tis_get_tpm_version(Object *obj); static inline TPMVersion tpm_get_version(void) { +#ifdef CONFIG_TPM Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL); if (obj) { return tpm_tis_get_tpm_version(obj); } +#endif return TPM_VERSION_UNSPEC; } -- 2.4.1