From nobody Sun May 19 13:14:50 2024 Delivered-To: importer@patchew.org Received-SPF: permerror (zohomail.com: Error in processing SPF Record) client-ip=216.145.221.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=permerror (zohomail.com: Error in processing SPF Record) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664433483; cv=none; d=zohomail.com; s=zohoarc; b=kb55Xlg7rl6Rw8p7ybjdFm17WPFlkcZwCMJVBf6a6m25S/uo1z+KpBu7mfGhvIu8RbVCFdDEUgVFAzVooNaryFahjlc3ImbbrxDynKGs15IkUd/g2omAckAbL2ufxmTAeIntNzSX4OKlX2q0zWttW9axX6HlNCUTZJaBhGm4ZFs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664433483; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=9w9zNYZdBsjX4wnMFYQ/zxhMyUV2chq/epuQhGlroEw=; b=BDRGY6wC2SlWOndxibLBzhPM0LkF2n3CAUZql0P1BhfM/7EXuNmAzFsO49ZwiqnirwuJjHGjAlH4VQo22uiK0lizRnV3zR6yCxHuyXJnWCU+NL/D8QgLOb0Xfq+Ofz9MSr16ysd2K1MHp1gTJfJ0I6omAh0XToej/HLvJJ/Hdy4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=permerror (zohomail.com: Error in processing SPF Record) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.145.221.124]) by mx.zohomail.com with SMTPS id 1664433483458890.7194761059386; Wed, 28 Sep 2022 23:38:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-2-6fj0nXchPRujaLRd5j2-ag-1; Thu, 29 Sep 2022 02:37:59 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 36BAE3C11048; Thu, 29 Sep 2022 06:37:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3890F2166B26; Thu, 29 Sep 2022 06:37:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E81861946A45; Thu, 29 Sep 2022 06:37:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4B40719465B8 for ; Thu, 29 Sep 2022 06:37:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 42E80C15BA5; Thu, 29 Sep 2022 06:37:53 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFC08C15BA4 for ; Thu, 29 Sep 2022 06:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664433481; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9w9zNYZdBsjX4wnMFYQ/zxhMyUV2chq/epuQhGlroEw=; b=TI/IGDAUYBe5TwvcziAnUnXdH785tELPnGSnoGthfe6cX9npj1UUU21gxx4X7Slu5+9VgJ En9AETrGbBPG4SlSyiDNLIZ15qD99QEe+zdzv4oLhT9JQ4C9I6rPAiIwsBQ7qavdxdFBsO KTTSCc/4DBJZwPXrxEo1GX1MQWKQGXk= X-MC-Unique: 6fj0nXchPRujaLRd5j2-ag-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] virgdbusmock: Mock g_dbus_connection_call_with_unix_fd_list_sync() only on UNIX-like systems Date: Thu, 29 Sep 2022 08:37:51 +0200 Message-Id: <6beb31311983867df2314a5d1e1edf3040a36ecb.1664433471.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664433485358100001 Content-Type: text/plain; charset="utf-8"; x-default="true" 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 Reviewed-by: J=C3=A1n Tomko --- tests/virgdbusmock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/virgdbusmock.c b/tests/virgdbusmock.c index 7a378a616a..8f5cc97911 100644 --- a/tests/virgdbusmock.c +++ b/tests/virgdbusmock.c @@ -68,6 +68,7 @@ VIR_MOCK_LINK_RET_ARGS(g_dbus_connection_call_sync, GCancellable *, cancellable, GError **, error) =20 +#ifdef G_OS_UNIX VIR_MOCK_LINK_RET_ARGS(g_dbus_connection_call_with_unix_fd_list_sync, GVariant *, GDBusConnection *, connection, @@ -83,3 +84,4 @@ VIR_MOCK_LINK_RET_ARGS(g_dbus_connection_call_with_unix_f= d_list_sync, GUnixFDList **, out_fd_list, GCancellable *, cancellable, GError **, error) +#endif /* G_OS_UNIX */ --=20 2.35.1