From 3933f723f17589e919f8fa198ac27d61342ad797 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 21 Mar 2018 19:29:44 +0100 Subject: [PATCH] Mingw 64bit compile fix Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105662 --- dbus/dbus-sysdeps-win.c | 5 ++++- dbus/dbus-transport-socket.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 70200e7f..cecb0e5a 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -2597,6 +2597,7 @@ static void dump_backtrace_for_thread (HANDLE hThread) sf.AddrFrame.Mode = AddrModeFlat; sf.AddrPC.Offset = context.Eip; sf.AddrPC.Mode = AddrModeFlat; +#define OFFSET_FORMAT "lx" #elif defined(_M_X64) dwImageType = IMAGE_FILE_MACHINE_AMD64; sf.AddrPC.Offset = context.Rip; @@ -2605,6 +2606,7 @@ static void dump_backtrace_for_thread (HANDLE hThread) sf.AddrFrame.Mode = AddrModeFlat; sf.AddrStack.Offset = context.Rsp; sf.AddrStack.Mode = AddrModeFlat; +#define OFFSET_FORMAT "I64x" #elif defined(_M_IA64) dwImageType = IMAGE_FILE_MACHINE_IA64; sf.AddrPC.Offset = context.StIIP; @@ -2615,6 +2617,7 @@ static void dump_backtrace_for_thread (HANDLE hThread) sf.AddrBStore.Mode = AddrModeFlat; sf.AddrStack.Offset = context.IntSp; sf.AddrStack.Mode = AddrModeFlat; +#define OFFSET_FORMAT "I64x" #else # error You need to fill in the STACKFRAME structure for your architecture #endif @@ -2659,7 +2662,7 @@ static void dump_backtrace_for_thread (HANDLE hThread) DPRINTF ("%3d %s", i++, pSymbol->Name); } else - DPRINTF ("%3d 0x%lx", i++, sf.AddrPC.Offset); + DPRINTF ("%3d 0x%" OFFSET_FORMAT, i++, sf.AddrPC.Offset); line.SizeOfStruct = sizeof(IMAGEHLP_LINE); if (SymGetLineFromAddr (GetCurrentProcess (), sf.AddrPC.Offset, &dwDisplacement, &line)) diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index fc941823..af4aa5b0 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -1026,7 +1026,7 @@ socket_handle_watch (DBusTransport *transport, flags); else _dbus_verbose ("asked to handle watch %p on fd %" DBUS_SOCKET_FORMAT " that we don't recognize\n", - watch, dbus_watch_get_socket (watch)); + watch, _dbus_socket_printable (_dbus_watch_get_socket (watch))); } #endif /* DBUS_ENABLE_VERBOSE_MODE */ -- 2.13.6