virgdbusmock: Mock g_dbus_connection_call_with_unix_fd_list_sync() only on UNIX-like systems

As of GLib commit c9874f817be51d3b652457daef3b10766b59db9a,
relesed in GLib 2.73, the g_dbus_connection_call_with_unix_fd_list_sync()
function is not defined always, only when G_OS_UNIX condition is
set. This is also the reason why our virGDBusCallMethodWithFD()
function is guarded with that macro. But virgdbusmock is compiled
always, even on !UNIX systems, e.g. mingw. Therefore, we need to
use the same macro to condition compile its mock.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2022-09-28 11:05:47 +02:00
parent 39e98f4113
commit b1fc788957

View File

@ -68,6 +68,7 @@ VIR_MOCK_LINK_RET_ARGS(g_dbus_connection_call_sync,
GCancellable *, cancellable, GCancellable *, cancellable,
GError **, error) GError **, error)
#ifdef G_OS_UNIX
VIR_MOCK_LINK_RET_ARGS(g_dbus_connection_call_with_unix_fd_list_sync, VIR_MOCK_LINK_RET_ARGS(g_dbus_connection_call_with_unix_fd_list_sync,
GVariant *, GVariant *,
GDBusConnection *, connection, GDBusConnection *, connection,
@ -83,3 +84,4 @@ VIR_MOCK_LINK_RET_ARGS(g_dbus_connection_call_with_unix_fd_list_sync,
GUnixFDList **, out_fd_list, GUnixFDList **, out_fd_list,
GCancellable *, cancellable, GCancellable *, cancellable,
GError **, error) GError **, error)
#endif /* G_OS_UNIX */