From nobody Fri Dec 19 06:35:44 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1754513246; cv=none; d=zohomail.com; s=zohoarc; b=RNgRI2KL3A1afWFBkbZrThjzx3ktNEgvNGFLekZMNiyaO44oSwhsDX7E1+IagW3yLHz5l/ME0+2VecqnZ76XxRjYCedhOchC4hEYvkEaKYAJadFwSPYq2VDl0tDgEm5IWis2CBD8uyftfI0toMsUC6wWfaANDsy4bC7YbL1o0iQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1754513246; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Sender:Subject:Subject:To:To:Message-Id; bh=P4yIRlopvl5MXBdsY9zHdKWpIaLK9jm0+TcbjbiAYAE=; b=Fp24cTEC7+TvTPVctUk6yjJFvVdA+nv1BZoAg4XDt6oi+g4VpMFVD4kPt+Vy0cnf8fb/EGhxlLXGBZcfp6DavmI0VYJYI4cBEXn+bjxn7x+gsVgs1vyPKcdpuNeHegy7a2X2z5LXP+XPpQ9CI3y93/yzw+8rWW1I6C1rYTfSF/s= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1754513246558782.6113180157934; Wed, 6 Aug 2025 13:47:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ujl2K-00055F-Bl; Wed, 06 Aug 2025 16:47:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujl2G-00054g-RN; Wed, 06 Aug 2025 16:46:56 -0400 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ujl2F-0004BR-2p; Wed, 06 Aug 2025 16:46:56 -0400 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 0EF51DA1C16; Wed, 06 Aug 2025 22:46:52 +0200 (CEST) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id DE97C46003A; Wed, 06 Aug 2025 22:46:51 +0200 (CEST) Authentication-Results: mail.v2201612906741603.powersrv.de; dkim=none; spf=softfail (mail.v2201612906741603.powersrv.de: 188.68.58.204 is neither permitted nor denied by domain of stefan@weilnetz.de) smtp.mailfrom=stefan@weilnetz.de; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=weilnetz.de (policy=none) To: Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Stefan Weil Subject: [PATCH for-10.1] meson: Fix brlapi compile test for Windows builds Date: Wed, 6 Aug 2025 22:45:58 +0200 Message-ID: <20250806204624.510091-1-sw@weilnetz.de> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [2.10 / 12.00]; VIOLATED_DIRECT_SPF(3.50)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; FORGED_SENDER(0.30)[sw@weilnetz.de,stefan@weilnetz.de]; ONCE_RECEIVED(0.20)[]; DMARC_POLICY_SOFTFAIL(0.10)[weilnetz.de : No valid SPF, No valid DKIM,quarantine,sampled_out]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; ASN(0.00)[asn:197540, ipnet:188.68.56.0/22, country:DE]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; FROM_NEQ_ENVFROM(0.00)[sw@weilnetz.de,stefan@weilnetz.de]; R_SPF_SOFTFAIL(0.00)[~all:c]; DBL_BLOCKED_OPENRESOLVER(0.00)[qemu.weilnetz.de:helo,qemu.weilnetz.de:rdns] X-Rspamd-Server: v2201612906741603 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 0EF51DA1C16 X-Spamd-Bar: ++ Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1754513247831124100 brlapi__openConnection returns a brlapi_fileDescriptor which is a pointer for Windows builds. The test for brlapi fails with cross builds on Debian trixie (x86_64-w64-mingw32-gcc (GCC) 14-win32): testfile.c:4:30: error: returning 'brlapi_fileDescriptor' {aka 'void *'} fr= om a function with return type 'int' makes integer from pointer without a c= ast [-Wint-conversion] 4 | int main(void) { return brlapi__openConnection (NULL, NULL, NU= LL); } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ Reviewed-by: Pierrick Bouvier Reviewed-by: Thomas Huth ----------- ../../../meson.build:1607: WARNING: could not link brlapi, disabling Signed-off-by: Stefan Weil --- I think that this patch is trivial because it does not change anything for Linux. Note that this patch only fixes the configure test and allows builds with the Braille API for Windows. A similar change can be applied to chardev/baum.c and will be sent separately because it is not required for 10.1. Note that for 64 bit Windows there is an issue because brlapi_fileDescriptor is a 64 bit pointer while QEMU assumes int for file descriptors. But the good news is that the resulting code seems to work nevertheless =E2=80=93 a= t least the people who asked me for Braille support on Windows are satisfied as far as I know. Regards, Stefan W. meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index e53cd5b413..d6abe1917e 100644 --- a/meson.build +++ b/meson.build @@ -1586,9 +1586,11 @@ if not get_option('brlapi').auto() or have_system brlapi =3D cc.find_library('brlapi', has_headers: ['brlapi.h'], required: get_option('brlapi')) if brlapi.found() and not cc.links(''' - #include - #include - int main(void) { return brlapi__openConnection (NULL, NULL, NULL); }'= '', dependencies: brlapi) + #include + #include + int main(void) { + return brlapi__openConnection(NULL, NULL, NULL) =3D=3D BRLAPI_INVALI= D_FILE_DESCRIPTOR; + }''', dependencies: brlapi) brlapi =3D not_found if get_option('brlapi').enabled() error('could not link brlapi') --=20 2.47.2