]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qtest: Don't compile qtest accel on non-POSIX systems
authorEduardo Habkost <ehabkost@redhat.com>
Mon, 22 Apr 2019 21:04:47 +0000 (18:04 -0300)
committerThomas Huth <thuth@redhat.com>
Thu, 2 May 2019 14:56:33 +0000 (16:56 +0200)
qtest_available() will always return 0 on non-POSIX systems.
It's simpler to just not compile the accelerator code on those
systems instead of relying on the AccelClass::available function.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190422210448.2488-3-ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> [on mingw64]
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
accel/Makefile.objs
accel/qtest.c
include/sysemu/qtest.h

index 2a5ed46940d5d12aaace0b83f6eb26945239631f..8b498d39d8b068c7fb86cd129262515a6967f143 100644 (file)
@@ -1,5 +1,5 @@
 obj-$(CONFIG_SOFTMMU) += accel.o
-obj-$(CONFIG_SOFTMMU) += qtest.o
+obj-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_POSIX)) += qtest.o
 obj-$(CONFIG_KVM) += kvm/
 obj-$(CONFIG_TCG) += tcg/
 obj-y += stubs/
index a02b3c26c7cae5f0f10a588418f56cfefa82cc49..5b88f55921920d9525c55afa34d729f6384fea69 100644 (file)
@@ -34,7 +34,6 @@ static void qtest_accel_class_init(ObjectClass *oc, void *data)
 {
     AccelClass *ac = ACCEL_CLASS(oc);
     ac->name = "QTest";
-    ac->available = qtest_available;
     ac->init_machine = qtest_init_accel;
     ac->allowed = &qtest_allowed;
 }
index 70aa40aa72e946793f7eae9314cdca3c2607a906..096ddfc20cb0062555a562795e56f62af54faab7 100644 (file)
@@ -27,13 +27,4 @@ bool qtest_driver(void);
 
 void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp);
 
-static inline int qtest_available(void)
-{
-#ifdef CONFIG_POSIX
-    return 1;
-#else
-    return 0;
-#endif
-}
-
 #endif