Commit 493b7830 extends core/qdev-properties-system.c with a property
to lookup a TPM backend, which calls into TPM related functions.
Unfortunately this breaks the build when --disable-tpm is used. To
fix this we extend stubs/tpm.c with the missing stub functions.

Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com>
---
 stubs/tpm.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/stubs/tpm.c b/stubs/tpm.c
index c18aac1..bb1db44 100644
--- a/stubs/tpm.c
+++ b/stubs/tpm.c
@@ -6,6 +6,7 @@
  */
 #include "qemu/osdep.h"
 #include "sysemu/tpm.h"
+#include "sysemu/tpm_backend.h"
 #include "qmp-commands.h"
 
 int tpm_init(void)
@@ -31,3 +32,18 @@ TpmModelList *qmp_query_tpm_models(Error **errp)
 {
     return NULL;
 }
+
+void tpm_backend_reset(TPMBackend *s)
+{
+    return;
+}
+
+int tpm_backend_init(TPMBackend *s, TPMIf *tpmif, Error **errp)
+{
+    return 0;
+}
+
+TPMBackend *qemu_find_tpm_be(const char *id)
+{
+    return NULL;
+}
\ No newline at end of file
-- 
2.5.5


Reply via email to