From 29c5c7e5f65977a77eddf6580fdc31ea4a263a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 6 Jun 2023 15:56:40 +0400 Subject: ui/dbus: compile without gio/gunixfdlist.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit D-Bus on windows doesn't support fd-passing. Let's isolate the fdlist-related code as a first step, before adding Windows support, using another mechanism. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-4-marcandre.lureau@redhat.com> --- ui/dbus-chardev.c | 6 ++++++ ui/dbus-console.c | 8 ++++++++ ui/dbus-listener.c | 2 ++ 3 files changed, 16 insertions(+) (limited to 'ui') diff --git a/ui/dbus-chardev.c b/ui/dbus-chardev.c index 940ef937cd..7154d81a9a 100644 --- a/ui/dbus-chardev.c +++ b/ui/dbus-chardev.c @@ -27,7 +27,9 @@ #include "qemu/config-file.h" #include "qemu/option.h" +#ifdef G_OS_UNIX #include +#endif #include "dbus.h" @@ -108,6 +110,7 @@ dbus_chardev_init(DBusDisplay *dpy) dbus_display_chardev_foreach, dpy); } +#ifdef G_OS_UNIX static gboolean dbus_chr_register( DBusChardev *dc, @@ -145,6 +148,7 @@ dbus_chr_register( qemu_dbus_display1_chardev_complete_register(object, invocation, NULL); return DBUS_METHOD_INVOCATION_HANDLED; } +#endif static gboolean dbus_chr_send_break( @@ -175,8 +179,10 @@ dbus_chr_open(Chardev *chr, ChardevBackend *backend, dc->iface = qemu_dbus_display1_chardev_skeleton_new(); g_object_set(dc->iface, "name", backend->u.dbus.data->name, NULL); g_object_connect(dc->iface, +#ifdef G_OS_UNIX "swapped-signal::handle-register", dbus_chr_register, dc, +#endif "swapped-signal::handle-send-break", dbus_chr_send_break, dc, NULL); diff --git a/ui/dbus-console.c b/ui/dbus-console.c index bc97614fec..d5f6c93637 100644 --- a/ui/dbus-console.c +++ b/ui/dbus-console.c @@ -28,7 +28,9 @@ #include "ui/kbd-state.h" #include "trace.h" +#ifdef G_OS_UNIX #include +#endif #include "dbus.h" @@ -163,6 +165,7 @@ dbus_display_console_class_init(DBusDisplayConsoleClass *klass) gobject_class->dispose = dbus_display_console_dispose; } +#ifdef G_OS_UNIX static void listener_vanished_cb(DBusDisplayListener *listener) { @@ -174,6 +177,7 @@ listener_vanished_cb(DBusDisplayListener *listener) g_hash_table_remove(ddc->listeners, name); qkbd_state_lift_all_keys(ddc->kbd); } +#endif static gboolean dbus_console_set_ui_info(DBusDisplayConsole *ddc, @@ -207,6 +211,7 @@ dbus_console_set_ui_info(DBusDisplayConsole *ddc, return DBUS_METHOD_INVOCATION_HANDLED; } +#ifdef G_OS_UNIX static gboolean dbus_console_register_listener(DBusDisplayConsole *ddc, GDBusMethodInvocation *invocation, @@ -282,6 +287,7 @@ dbus_console_register_listener(DBusDisplayConsole *ddc, trace_dbus_registered_listener(sender); return DBUS_METHOD_INVOCATION_HANDLED; } +#endif static gboolean dbus_kbd_press(DBusDisplayConsole *ddc, @@ -510,8 +516,10 @@ dbus_display_console_new(DBusDisplay *display, QemuConsole *con) "device-address", device_addr, NULL); g_object_connect(ddc->iface, +#ifdef G_OS_UNIX "swapped-signal::handle-register-listener", dbus_console_register_listener, ddc, +#endif "swapped-signal::handle-set-uiinfo", dbus_console_set_ui_info, ddc, NULL); diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 23034eebf9..41597a0078 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -25,7 +25,9 @@ #include "qemu/error-report.h" #include "sysemu/sysemu.h" #include "dbus.h" +#ifdef G_OS_UNIX #include +#endif #ifdef CONFIG_OPENGL #include "ui/shader.h" -- cgit v1.2.3