From 1e35c693e474f341d03a525a54af93c101d4737d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 13 Feb 2012 19:54:52 +0000 Subject: Make dbus-daemon.exe --print-address work under Windows The DBusPipe code was broken by commit 6e214b5b3c2837, which switched from C runtime API to Win32 API for WinCE's benefit. In a DBusPipe, fd_or_handle is in fact always a C runtime file descriptor, which can't be used with the Win32 API (which expects a HANDLE). This commit goes back to the C runtime API. It might cause WinCE support to regress, but at least dbus-daemon.exe --print-address works again. This is enough to make a few tests work under Wine when cross-compiling from Linux to mingw-w64: in particular, this now works: DBUS_TEST_DAEMON=bus/dbus-daemon.exe DBUS_TEST_DATA=test/data \ wine test/test-dbus-daemon.exe -p /echo/session Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46049 Signed-off-by: Simon McVittie Reviewed-by: Ralf Habacker --- dbus/dbus-sysdeps-util-win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbus/dbus-sysdeps-util-win.c') diff --git a/dbus/dbus-sysdeps-util-win.c b/dbus/dbus-sysdeps-util-win.c index f5646f39..111db9ea 100644 --- a/dbus/dbus-sysdeps-util-win.c +++ b/dbus/dbus-sysdeps-util-win.c @@ -191,7 +191,7 @@ _dbus_write_pid_to_file_and_pipe (const DBusString *pidfile, DBusString pid; int bytes; - _dbus_verbose ("writing our pid to pipe %d\n", print_pid_pipe->fd_or_handle); + _dbus_verbose ("writing our pid to pipe %d\n", print_pid_pipe->fd); if (!_dbus_string_init (&pid)) { -- cgit v1.2.3