aboutsummaryrefslogtreecommitdiff
path: root/ui/dbus-chardev.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-06-06 15:56:40 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-06-27 17:08:56 +0200
commit29c5c7e5f65977a77eddf6580fdc31ea4a263a6a (patch)
tree33ad97af5f6909a6996ca762ddf952d53c0f2d25 /ui/dbus-chardev.c
parent1d48c9fd8e4ab55662d8daec4af1d63cd2b54699 (diff)
downloadqemu-29c5c7e5f65977a77eddf6580fdc31ea4a263a6a.zip
qemu-29c5c7e5f65977a77eddf6580fdc31ea4a263a6a.tar.gz
qemu-29c5c7e5f65977a77eddf6580fdc31ea4a263a6a.tar.bz2
ui/dbus: compile without gio/gunixfdlist.h
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 <marcandre.lureau@redhat.com> Message-Id: <20230606115658.677673-4-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui/dbus-chardev.c')
-rw-r--r--ui/dbus-chardev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/dbus-chardev.c b/ui/dbus-chardev.c
index 940ef93..7154d81 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 <gio/gunixfdlist.h>
+#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);