From nobody Sat Nov 15 23:38:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1745470282; cv=none; d=zohomail.com; s=zohoarc; b=dOA08qMtXbTbIWMQhnAFBhINPbf86FUWsty7fv424SskKnGldTsGzmu6Fh0WSWClTz63ZesVvGQH9WMiXoJX4JAKScM4ducDkBCVAw3ufqfe4fDEZRi5K3jYQXXpBG9cuTB1Y8zX8LJ7me8e34FqBjCT9hFNpfWi5ibfLlfCPOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745470282; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UHcKhUy69pRs0cRfr7uvJrTweyJDdDo4Zt7XhLrkh30=; b=hOTJG9C9dIsjVt/Q7exL1byexbdaLgYSjRxjZe6urY4CTfX7YboklgVYDfGrSzx9itVYAM0bKb4fpkPSz5owVoLoGrkoio3PXXwcJiZpsL7tVI31IWMrV/lo76ZlpzPp1Yw9ZvgBc+7JpZH7xy5ditUNNcXbtshprCjLvn2ON7g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745470282271242.18713536691598; Wed, 23 Apr 2025 21:51:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7oXu-0005h0-UI; Thu, 24 Apr 2025 00:50:46 -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 1u7oXq-0005gc-OX for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:43 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7oXp-0003Vm-4Z for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:42 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-73c17c770a7so681878b3a.2 for ; Wed, 23 Apr 2025 21:50:40 -0700 (PDT) Received: from localhost ([157.82.205.213]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-73e25a9abf2sm448766b3a.122.2025.04.23.21.50.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Apr 2025 21:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1745470239; x=1746075039; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=UHcKhUy69pRs0cRfr7uvJrTweyJDdDo4Zt7XhLrkh30=; b=DPrq9CzCV50UCB2/SbHYi9ueZ4vP5ciVY12ab9TNqf/wES29+nSnsI63Cuz6mtefev ZVUVpRZlnDTbj9UXyg0S+Pm7I9FEUNMzfUm/7w7nXp4mQ152nrm7+cOvNqVfc30Lknu7 MqcVn4yD7UAEPY+MWEQ2rHSDluCso2ndSLz2ef6aLuuuRbb83JVycZg59dGXlf8i8w8A curUqtR5/MuCmgOlIx+eKywdTe0+VUB4LXxISX42Mm/CLA9Y/HRcSVtt4/ZPK2ZSluYe AkR9lzEbsw2IsVd3pcrD4BUDvB/H1PZmkEaO8PARKLSk79bKfl8RstS2hjI1vE+fRwr9 8DBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745470239; x=1746075039; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UHcKhUy69pRs0cRfr7uvJrTweyJDdDo4Zt7XhLrkh30=; b=ikJkb3r8G1Ayse7Gm/1/LILzeONgVHnPZY3s9/Pb1Mq7Mz8IDojSUPt49AIbbiA79H B4eYlKWKOGCkaGD1T0HahPOSSDHoc41oCjXumPN2XRhEJWFfBv6qFoKJyDkvpZYxTspE qDXstKbCQNO0R6/IOyEGV8UQsKNGUT5IFK1sr4CTZsy9QQbqsEcsKfCqpLITh6JbVUI1 M7gswqRioGPWq4jHEfL0eQjagGHTsyMZjprKQse5RRj/wn98wYJKUBJOrIkRkJwnbPQz Wdww8bow93Moocbvk8frZXtxVmKPcCPVYZwJa9A8vfKG+OQsEeK5tH+2nMsNe2P5u7kD opAQ== X-Gm-Message-State: AOJu0YxmVGSzMYSgyUVm/wNe6HGYfMk1BlMqtdDPgzaq7gAmJIlvwW5+ P71aJOmyuzbg5miunCTrcVyyDMP9qUt6ASk6XL1v4ATHk07E3+5+Z6rwWCT63LA= X-Gm-Gg: ASbGncupmhxR0yUUBm6fL2ge+Zn7igJWoofX6osh/njEO+UG/BfBReNhR8FUBcmHcup 71ctqAHMTlz/Y8VSshU7I0Z/ukd5gpa6FcfTOu1KZL/d/hNHhVDW25b6T4YQqJsLKCSZd4Ss1jD 5Mj5g9PrS+e+u7va+RYQ1lvrgKSuNpISW06I5+Bm7RMgjE22UXyC+JDaAutDbkY7jRo+ZgkG64X nh+NyVxNmT73S530WP1mIvFcRuXA8FLbS/xtrxLHML7knlDNoNwSe1LCcXlF+eozT3x87YyI0Lc ZdCSCHW60/gzmYMcbGZS1ef02dgktQZTxmtk61EVwip5 X-Google-Smtp-Source: AGHT+IEra/vFCi2BDDzY1r4nUErC79fofw+U0qF1kAowqiak+bzwuPamKZO0tJFniQlkIfGd/bsu5g== X-Received: by 2002:a05:6a00:2285:b0:73e:970:731 with SMTP id d2e1a72fcca58-73e24aecfcamr1785136b3a.16.1745470239055; Wed, 23 Apr 2025 21:50:39 -0700 (PDT) From: Akihiko Odaki Date: Thu, 24 Apr 2025 13:50:11 +0900 Subject: [PATCH 1/4] meson: Use has_header_symbol() to check getcpu() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250424-buildsys-v1-1-97655e3b25d7@daynix.com> References: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> In-Reply-To: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.15-dev-edae6 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=2607:f8b0:4864:20::434; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1745470283842019100 The use of gnu_source_prefix in the detection of getcpu() was ineffective because the header file that declares getcpu() when _GNU_SOURCE is defined was not included. Pass sched.h to has_header_symbol() so that the existence of the declaration will be properly checked. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 41f68d38069b..c0ecb6feab77 100644 --- a/meson.build +++ b/meson.build @@ -2635,7 +2635,6 @@ config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_f= unction('clock_adjtime')) config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fall= ocate')) -config_host_data.set('CONFIG_GETCPU', cc.has_function('getcpu', prefix: gn= u_source_prefix)) config_host_data.set('CONFIG_SCHED_GETCPU', cc.has_function('sched_getcpu'= , prefix: '#include ')) # Note that we need to specify prefix: here to avoid incorrectly # thinking that Windows has posix_memalign() @@ -2713,6 +2712,8 @@ config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE', config_host_data.set('CONFIG_FIEMAP', cc.has_header('linux/fiemap.h') and cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP')) +config_host_data.set('CONFIG_GETCPU', + cc.has_header_symbol('sched.h', 'getcpu', prefix: gnu= _source_prefix)) config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) --=20 2.49.0 From nobody Sat Nov 15 23:38:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1745470283; cv=none; d=zohomail.com; s=zohoarc; b=PgloyLnti6KluEAYHJV/PL8QWDVQl6NZ088/vmTtBTuWNiN1/uOqMqVmQrPHHbEaQ75VeyLObU+PjssH3aj3n77hdLXNWdrVBJWN9B+9TL2pqCUlyooWiv5+ipWQUJ3bItZx092qKfg12T8QsXkon3JDXQ56hUZqZwjUh1mPWL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745470283; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YpQVNvyURY83rQ+0SoqZteehI+zIQXlO14ywFIRoUsc=; b=eOVUE6KuJfZmym7OmK0XhhI1AEM88JQUFid82p/r8N1VBNmNTtw5pMXIajFN8AjnZeena+ZXgeFqao77Xgvg6wsL2SWg9rK0EOoIgRcB63MJm4x1obtjPsis3Mc9kTH6aAwGdO1jsGeCkN2t3InYsoIdnU9pmGtxPr5TARefF8M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17454702831421018.8111520944797; Wed, 23 Apr 2025 21:51:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7oXy-0005i6-N2; Thu, 24 Apr 2025 00:50:50 -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 1u7oXv-0005hO-LZ for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:47 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7oXt-0003W0-Ld for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:47 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-afc857702d1so443196a12.3 for ; Wed, 23 Apr 2025 21:50:44 -0700 (PDT) Received: from localhost ([157.82.205.213]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-22db4d76e0bsm3638505ad.43.2025.04.23.21.50.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Apr 2025 21:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1745470243; x=1746075043; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YpQVNvyURY83rQ+0SoqZteehI+zIQXlO14ywFIRoUsc=; b=vWUWgpDsgJFBbqWfcuDcG9VwT8QyZPlKmuqbtYScWZ5JNtcjejUwfIi0UJaH0sHsT7 zTwVvHtvWLubeSoe13sYtd4XNEnPActsT+Bv6MOFLIzbqqPTSAQXPyXCYMgeYDVhIQYZ pzxfgCNua1jxqxn2QPLwJRVNIdODNasZ/RfpsKnSEDOOIVZYSqCKubPkLG2YiihPTi3h p5lQb0hQdmDq73wvj9TSfkK0HeyRRB9tg3n4BanzpLV5iNeFwGUw9mKFJbhXnyCN3JGZ TNWGULZaYf+VwO4mOv6BGl40KhCz4Ht3dgp3wG/+xrec0GFk5skAXqa9XLbBHShUov6l Upqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745470243; x=1746075043; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YpQVNvyURY83rQ+0SoqZteehI+zIQXlO14ywFIRoUsc=; b=R1xWL7HE1Xm2mobtyB0SlYlPsZSv2DHUgRRebcXILyEs44jFbmEWAwzNkUHCGSdFj4 kdkgZRGQowCQhMNW2nV5a82xIdlGKU40gAeV3IfblrxXZ/rl6UYdrqnMQ5iK7ssnJLiH CZlxrK5hONeBaOvfhau0cghM6Dx7HjzqybBa24IN6/NHV/9TWAu/gCIxH2BR7FjPYMmX 1RiA8nRJmvZEiwdVm4VXQ5VmvAkfILDNiOX6MiE+tBvWERb78pK7IvwKOw9qYd1AMxbh 6C+It+bzcVbOIjZ46nfEW88dZmCU7XdPHFewCSJJjQ2oyjun43Bgzq19hcvlmQeYqoEM 4tNg== X-Gm-Message-State: AOJu0Yw/JHFLU9hzkduCo1N3/U4OJ+wlIMAVxZIdebMyzy9vQwJRuEKs lVMDMkkrXU0QtQmBN0K44s1mbiPJItJxQD8yKWQSNmf/al1Dgmlacvwx7Ks9MrE= X-Gm-Gg: ASbGnctBzOQSLnhs05iqcHwo7Up5pKI2Oc5+eiqBHIKnLniP5qrldCJNeOdXc5nEDUM pAGNcHqvhXe+mZi3v9Sh7/xr37TZwqiRyKZlr3kpQu6R/0lZ0WYpnmbYBBHhNUdCFGLcpdF5ULc dVL1bvPYmS+vnte0CjI5L46Fe2T18KUibzO5+kkSqwRfYlrQPNltsuhwALe9jOCy+qoGHSfHyrc W/OfaZg34mUofic6i/zaTBLYMe9q6u1BL11RwHDP6w+bXWAbzwUhDCz7RFuKMPEWU6JOrxHkJca igFhHc1jNRlbT6OC8NJ2d/8IozofKKedQd9+j4I4prVfkxQnE57przo= X-Google-Smtp-Source: AGHT+IHXoJ3/QXAc0kbduRpnbwtd51GOmBepvpAuCwQzO1wrhAA8CwGoMEYVDu7hds9AmfweVv1VGQ== X-Received: by 2002:a17:902:cecd:b0:223:65a9:ab86 with SMTP id d9443c01a7336-22db3bdb024mr22000015ad.12.1745470243697; Wed, 23 Apr 2025 21:50:43 -0700 (PDT) From: Akihiko Odaki Date: Thu, 24 Apr 2025 13:50:12 +0900 Subject: [PATCH 2/4] meson: Remove CONFIG_STATX and CONFIG_STATX_MNT_ID MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250424-buildsys-v1-2-97655e3b25d7@daynix.com> References: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> In-Reply-To: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.15-dev-edae6 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=2607:f8b0:4864:20::52f; envelope-from=akihiko.odaki@daynix.com; helo=mail-pg1-x52f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1745470285477019000 CONFIG_STATX and CONFIG_STATX_MNT_ID are not used since commit 8ab5e8a503b5 ("virtiofsd: Remove build and docs glue"). Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/meson.build b/meson.build index c0ecb6feab77..1a02cd89903b 100644 --- a/meson.build +++ b/meson.build @@ -2191,14 +2191,6 @@ gnu_source_prefix =3D ''' #endif ''' =20 -# Check whether the glibc provides STATX_BASIC_STATS - -has_statx =3D cc.has_header_symbol('sys/stat.h', 'STATX_BASIC_STATS', pref= ix: gnu_source_prefix) - -# Check whether statx() provides mount ID information - -has_statx_mnt_id =3D cc.has_header_symbol('sys/stat.h', 'STATX_MNT_ID', pr= efix: gnu_source_prefix) - have_vhost_user_blk_server =3D get_option('vhost_user_blk_server') \ .require(host_os =3D=3D 'linux', error_message: 'vhost_user_blk_server requires linux') \ @@ -2560,8 +2552,6 @@ config_host_data.set('CONFIG_CRYPTO_SM3', crypto_sm3.= found()) config_host_data.set('CONFIG_HOGWEED', hogweed.found()) config_host_data.set('CONFIG_QEMU_PRIVATE_XTS', xts =3D=3D 'private') config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim) -config_host_data.set('CONFIG_STATX', has_statx) -config_host_data.set('CONFIG_STATX_MNT_ID', has_statx_mnt_id) config_host_data.set('CONFIG_ZSTD', zstd.found()) config_host_data.set('CONFIG_QPL', qpl.found()) config_host_data.set('CONFIG_UADK', uadk.found()) --=20 2.49.0 From nobody Sat Nov 15 23:38:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1745470282; cv=none; d=zohomail.com; s=zohoarc; b=Nw8hhAwO8Qch/ZhKw9d+fOrMbf9A+hJCowZolMzdaNPUkoEsKdRtPpnANV9lCB3nnnn4Iyn+qjBswBuA1Ad05fSrtajiA5HA/JdYrV2JB5wr+q+yFb5yold2FgJ2ympfy+x0Wmz3TeHAyr7VBr4QJO+UlV78HoIoELkb2p3LB1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745470282; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BdUG64MOtuB3ZvgnW7R6lB6dGxWNK/aX5ltv/O5QLQI=; b=H64YFoEGk3uB9GAnPeoh5UgYbHDYazRJFciH46QF5/zfMjExs+e6R5ybv/uRC4Vh8c8rAL/gNyS/FVvu/doaeyO3mGxHMqOtLnD4S50wSejSwFcv1Ys7Icb1LpxfRyB3hwy+AZkjUJDPz3GQJNwqZPx0sZ5ANTNo1jZchVaMzQM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745470282219748.0940973619488; Wed, 23 Apr 2025 21:51:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7oY2-0005jC-2R; Thu, 24 Apr 2025 00:50:54 -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 1u7oY0-0005ix-Sy for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:52 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7oXy-0003WL-MF for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:52 -0400 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-aee79a0f192so319538a12.3 for ; Wed, 23 Apr 2025 21:50:49 -0700 (PDT) Received: from localhost ([157.82.205.213]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-b15fadeb911sm350553a12.65.2025.04.23.21.50.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Apr 2025 21:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1745470249; x=1746075049; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BdUG64MOtuB3ZvgnW7R6lB6dGxWNK/aX5ltv/O5QLQI=; b=bvMYW6k9fuYD+LRJ+21ha2SpKbAdoUs5s1t5HX6AY1tSu/K5wief9nMiglMxTOLtkk 6eAxMFw7X65Ra1G4PYGM0qQ9TrXPbOcalJWfZIw46G9SWnkQRXuS0AsKdY6I1nGDnyxu As5XBzDJ7ZJGrecSHkeD+h2hgXaC//bVNECn6ITwOYlMnQ5tOgfgpK+9Nw/lMCpNEPX4 pcM2RuynZYrdvNm2UYIaPzwRLjMHI7LtOMIB6TE6Y48RGra8P07zJCGYwz7OhhZtCdZI 0tMu6fqqzklFoyaHqOwhy9m6PZx0JSZyvG9ZWiLeZE85b1P2h7ADHIbgA3vW1QRVWguW aMyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745470249; x=1746075049; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BdUG64MOtuB3ZvgnW7R6lB6dGxWNK/aX5ltv/O5QLQI=; b=rtQR4nCHGtRCLtKTPaWXRnV+CmX7TR1WkVhRWazpcLHsrbH4pTEVzwQvCdXI8W0P+4 KIVp2HwsOc9mJYVOSXAZUIXm1CCZ8zT9nCAI69bDvTm/3m8+XZwwCEeiGSnPXXoidoAn /41G/7iV8coUVbl/9QCt3NR/nt/K4d4ikb0GNX0cSyzKxKB0PIZOGGhQaMz8Jx6XFzV8 Kx1l3mzemdHESpB+WSS05O15GxrxKpei0Feaffk6KW+MIWigp5WYEhcFGhH6+OZazywI qnaoR4Dc9Wru9aiaaSQQprRnCTODN9GlaNmCwy3iAPq9z18vNvL8oEfc02g45yT7MMS2 aKmg== X-Gm-Message-State: AOJu0Yz7j+oLoWzniKjgpVmOx2UrXnnI+wYPfnSjkesuFbSm099L0qNS uHWD1Y5jxwUQa9I8uJPTa0dzMyawkLEPkhaAfTKuQP09dBzXASNDsJQjeVW0A2g= X-Gm-Gg: ASbGncsSgxSGvnq/JdAnTi8/rBIWRdCf1zs8z8HRbwWyjTXuU09/J3EeFOWi/LgfMMl rJQsS8F7kAN+Y6hj+MXW52AMwE0rSVgZHu8geqlJx8XAUPB+/hr2NVGysNJtEkgyTnaYN/vFVEh XjACQPKjCwBibX8CjXXxsGB97RQQa/0WMICJCWF2g3yUaRe7F8n6r8OJS81yjdT6MIDDbCTCsVc HUp/dwr7XCq1LFbRJ6QWs3Sm8homsk0GcEDANfsJT3fxVCDszUW02qRuX9IoKcg4ksMrs0czDDX syi3JQV93bU7CIyWcYM5T0o5h1mNNlspUhO4ZOmF6N8W X-Google-Smtp-Source: AGHT+IGQgJxP8iP/9emUrbfAaCr4Qe23m4kx0MOoLUDx047YrzauNRxypZczGn65nlxBHs/Ql82XYg== X-Received: by 2002:a05:6a20:9c8d:b0:1f5:6b36:f574 with SMTP id adf61e73a8af0-20444f45dddmr1795022637.38.1745470248768; Wed, 23 Apr 2025 21:50:48 -0700 (PDT) From: Akihiko Odaki Date: Thu, 24 Apr 2025 13:50:13 +0900 Subject: [PATCH 3/4] meson: Share common C source prefixes MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250424-buildsys-v1-3-97655e3b25d7@daynix.com> References: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> In-Reply-To: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.15-dev-edae6 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=2607:f8b0:4864:20::52b; envelope-from=akihiko.odaki@daynix.com; helo=mail-pg1-x52b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1745470284030019100 gnu_source_prefix defines _GNU_SOURCE for compiler object functions. The definition is universally available in the code base. docs/devel/style.rst also says that the "qemu/osdep.h" header is always included, so files included in the file is also universally available in the code base. Rename gnu_source_prefix to osdep_prefix, and add #include directives that are referred by the users of gnu_source_prefix and contained in qemu/osdep.h to safely de-duplicate #include directives. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 68 +++++++++++++++++++++++++++++----------------------------= ---- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/meson.build b/meson.build index 1a02cd89903b..0a35fc3fa9fe 100644 --- a/meson.build +++ b/meson.build @@ -2185,10 +2185,21 @@ if not has_malloc_trim and get_option('malloc_trim'= ).enabled() endif endif =20 -gnu_source_prefix =3D ''' +osdep_prefix =3D ''' #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif + + #include + #include + + #include + /* Put unistd.h before time.h as that triggers localtime_r/gmtime_r + * function availability on recentish Mingw-w64 platforms. */ + #include + #include + #include + #include ''' =20 have_vhost_user_blk_server =3D get_option('vhost_user_blk_server') \ @@ -2703,7 +2714,7 @@ config_host_data.set('CONFIG_FIEMAP', cc.has_header('linux/fiemap.h') and cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP')) config_host_data.set('CONFIG_GETCPU', - cc.has_header_symbol('sched.h', 'getcpu', prefix: gnu= _source_prefix)) + cc.has_header_symbol('sched.h', 'getcpu', prefix: osd= ep_prefix)) config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) @@ -2748,8 +2759,7 @@ config_host_data.set('HAVE_UTMPX', config_host_data.set('CONFIG_EVENTFD', cc.links(''' #include int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }''')) -config_host_data.set('CONFIG_FDATASYNC', cc.links(gnu_source_prefix + ''' - #include +config_host_data.set('CONFIG_FDATASYNC', cc.links(osdep_prefix + ''' int main(void) { #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 return fdatasync(0); @@ -2758,10 +2768,8 @@ config_host_data.set('CONFIG_FDATASYNC', cc.links(gn= u_source_prefix + ''' #endif }''')) =20 -has_madvise =3D cc.links(gnu_source_prefix + ''' - #include +has_madvise =3D cc.links(osdep_prefix + ''' #include - #include int main(void) { return madvise(NULL, 0, MADV_DONTNEED); }''') missing_madvise_proto =3D false if has_madvise @@ -2771,21 +2779,18 @@ if has_madvise # missing-prototype case, we try again with a definitely-bogus prototype. # This will only compile if the system headers don't provide the prototy= pe; # otherwise the conflicting prototypes will cause a compiler error. - missing_madvise_proto =3D cc.links(gnu_source_prefix + ''' - #include + missing_madvise_proto =3D cc.links(osdep_prefix + '''> #include - #include extern int madvise(int); int main(void) { return madvise(0); }''') endif config_host_data.set('CONFIG_MADVISE', has_madvise) config_host_data.set('HAVE_MADVISE_WITHOUT_PROTOTYPE', missing_madvise_pro= to) =20 -config_host_data.set('CONFIG_MEMFD', cc.links(gnu_source_prefix + ''' +config_host_data.set('CONFIG_MEMFD', cc.links(osdep_prefix + ''' #include int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) -config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.links(gnu_source_prefix += ''' - #include +config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.links(osdep_prefix + ''' #if !defined(AT_EMPTY_PATH) # error missing definition #else @@ -2796,13 +2801,12 @@ config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.li= nks(gnu_source_prefix + ''' # i.e. errno is set and -1 is returned. That's not really how POSIX define= s the # function. On the flip side, it has madvise() which is preferred anyways. if host_os !=3D 'darwin' - config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(gnu_source_prefix = + ''' + config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(osdep_prefix + ''' #include - #include int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }= ''')) endif =20 -config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(gnu_sourc= e_prefix + ''' +config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(osdep_pre= fix + ''' #include =20 static void *f(void *p) { return NULL; } @@ -2813,7 +2817,7 @@ config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID= ', cc.links(gnu_source_pref pthread_setname_np(thread, "QEMU"); return 0; }''', dependencies: threads)) -config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(gnu_sour= ce_prefix + ''' +config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(osdep_pr= efix + ''' #include =20 static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; } @@ -2823,7 +2827,7 @@ config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TI= D', cc.links(gnu_source_pre pthread_create(&thread, 0, f, 0); return 0; }''', dependencies: threads)) -config_host_data.set('CONFIG_PTHREAD_SET_NAME_NP', cc.links(gnu_source_pre= fix + ''' +config_host_data.set('CONFIG_PTHREAD_SET_NAME_NP', cc.links(osdep_prefix += ''' #include #include =20 @@ -2835,9 +2839,8 @@ config_host_data.set('CONFIG_PTHREAD_SET_NAME_NP', cc= .links(gnu_source_prefix + pthread_set_name_np(thread, "QEMU"); return 0; }''', dependencies: threads)) -config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(gnu_sour= ce_prefix + ''' +config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_pr= efix + ''' #include - #include =20 int main(void) { @@ -2846,7 +2849,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOC= K', cc.links(gnu_source_pre pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); return 0; }''', dependencies: threads)) -config_host_data.set('CONFIG_PTHREAD_AFFINITY_NP', cc.links(gnu_source_pre= fix + ''' +config_host_data.set('CONFIG_PTHREAD_AFFINITY_NP', cc.links(osdep_prefix += ''' #include =20 static void *f(void *p) { return NULL; } @@ -2863,15 +2866,10 @@ config_host_data.set('CONFIG_PTHREAD_AFFINITY_NP', = cc.links(gnu_source_prefix + CPU_FREE(cpuset); return 0; }''', dependencies: threads)) -config_host_data.set('CONFIG_SIGNALFD', cc.links(gnu_source_prefix + ''' +config_host_data.set('CONFIG_SIGNALFD', cc.links(osdep_prefix + ''' #include - #include int main(void) { return signalfd(-1, NULL, SFD_CLOEXEC); }''')) -config_host_data.set('CONFIG_SPLICE', cc.links(gnu_source_prefix + ''' - #include - #include - #include - +config_host_data.set('CONFIG_SPLICE', cc.links(osdep_prefix + ''' int main(void) { int len, fd =3D 0; @@ -2880,13 +2878,13 @@ config_host_data.set('CONFIG_SPLICE', cc.links(gnu_= source_prefix + ''' return 0; }''')) =20 -config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_source_prefix + ''' +config_host_data.set('HAVE_MLOCKALL', cc.links(osdep_prefix + ''' #include int main(void) { return mlockall(MCL_FUTURE); }''')) =20 -config_host_data.set('HAVE_MLOCK_ONFAULT', cc.links(gnu_source_prefix + ''' +config_host_data.set('HAVE_MLOCK_ONFAULT', cc.links(osdep_prefix + ''' #include int main(void) { return mlockall(MCL_FUTURE | MCL_ONFAULT); @@ -2895,7 +2893,7 @@ config_host_data.set('HAVE_MLOCK_ONFAULT', cc.links(g= nu_source_prefix + ''' have_l2tpv3 =3D false if get_option('l2tpv3').allowed() and have_system have_l2tpv3 =3D cc.has_type('struct mmsghdr', - prefix: gnu_source_prefix + ''' + prefix: osdep_prefix + ''' #include #include ''') endif @@ -3011,13 +3009,13 @@ if has_int128_type endif endif =20 -config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefix + ''' +config_host_data.set('CONFIG_GETAUXVAL', cc.links(osdep_prefix + ''' #include int main(void) { return getauxval(AT_HWCAP) =3D=3D 0; }''')) =20 -config_host_data.set('CONFIG_ELF_AUX_INFO', cc.links(gnu_source_prefix + '= '' +config_host_data.set('CONFIG_ELF_AUX_INFO', cc.links(osdep_prefix + ''' #include int main(void) { unsigned long hwcap =3D 0; @@ -3130,9 +3128,7 @@ config_host_data.set('CONFIG_MEMBARRIER', get_option(= 'membarrier') \ .allowed()) =20 have_afalg =3D get_option('crypto_afalg') \ - .require(cc.compiles(gnu_source_prefix + ''' - #include - #include + .require(cc.compiles(osdep_prefix + ''' #include #include int main(void) { --=20 2.49.0 From nobody Sat Nov 15 23:38:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1745470323; cv=none; d=zohomail.com; s=zohoarc; b=O0l5rcjWwZri+9f0KtLNnhfbUH90f7aohPfvBLT77TV1Cdsmkf84nsvzbTYNwkYRyWTUYuPnKL/cGmnjnKX0WjI9i/LR2O48NloKMEy0IB5rbm215UkhOVuogPSiiSMUqQ8BRZ2EepufktAize+BiJUQ8ynP0sQMyzV2qCDFJ3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745470323; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5QF5JeRFPrjQjh285riWsSUyUV7OS4PwL49o9H6ac4c=; b=a/un/NsgcZDgXK5TMA3YYLA4mn9HLrjX3UBwOGLLyz3ibKcnEXqCLikK0sFaFXdEXX58XpfnLJfLnfVN25YnbjPaAkHrOv0YBAX08n9OMFrpjtxyvMNlKfBbfYKQ/9RszBH0RvZ79LCh+cULyd/z6uxeGpAZFx4CC5xXmC6t950= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745470323934119.40943988446736; Wed, 23 Apr 2025 21:52:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7oY7-0005jr-6t; Thu, 24 Apr 2025 00:50:59 -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 1u7oY5-0005jf-Bt for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:57 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7oY3-0003Wa-GI for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:57 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-736dd9c4b40so1531756b3a.0 for ; Wed, 23 Apr 2025 21:50:54 -0700 (PDT) Received: from localhost ([157.82.205.213]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-73e25912c5asm473338b3a.6.2025.04.23.21.50.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Apr 2025 21:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1745470254; x=1746075054; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5QF5JeRFPrjQjh285riWsSUyUV7OS4PwL49o9H6ac4c=; b=1Vy/9/k70Kd7hQ2a7calIV40wILLJ654Iuu0n2oekXfhpxEol3KuFaCQGVDlGBIbvx CL9NNJyeWCAD5XaUdMKAK4pUJFYFBf3NNuL6Rqt4p9gmYr0v6fQZ4n/UxruqxfGa6LVt ZRWDXKRobsOzidAEBJ4t6o39XuVIGEHo6wJGZbAl2UNE0wNbe63rCOjZvu4ZQ1iscZXO dZxxlypq/zoNgdcu9V2kpQT7FKo0jjCHGcAvykMMYa3IKFpgfRtDWkjoObacJpwJDGR9 W5YpJYIRmb4utZNLhmoi2vqVUMJ3f0/T1y7u2oNqPigtq+lMCxsu/5hOB9ngAmvJ8kU+ Z5Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745470254; x=1746075054; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5QF5JeRFPrjQjh285riWsSUyUV7OS4PwL49o9H6ac4c=; b=XJ1bJJzlGGG4BfMgepl0Zt8aWJRU7kPUiWZVagwYsDiQmIvqxQBA1K3rbNz1r1XC/s p0P8F/nuKU7azsWaTsT4zTElGt8Wbfk1PxUWnCCcPdNs4dsY0eil599yNfDSbsnOUEjT TIyQcpFrkhBdj3MmRRrt6aYmbg/ZJv+nKbAmK48lW71gVFKf9FliKaOrRLwKSnAtpqIK nvBY53rur52AX2jJNe6pgDsykfkVJCzC5hfd77cS5SU+qTKXkH/q2MOuookHXipoi+16 2uGVoOmBuhd3BQlHpJKg7FOdD5rrHHW8pcoXQ7PswzOxZxTC7Eed74BPXehfcJFgMn0D vIag== X-Gm-Message-State: AOJu0YzLHz5Fm696BuqWmg7X2ln2oFyJqWrlysRfzBNLlPPyqF6tHf6F mosy4jI2dsr8+PuM0i2GCUsBk2XlBJgsg0QG1+ApeWILXJGTQHwlBcKhMRuPGzc= X-Gm-Gg: ASbGncsD/75qUl3qbKOgugkbYLPP9synCK7/FX6LpOTZy33voTQ6x0xPdVmvsamjwCb Yu7lZ9322+alrWgvW3Zc05EMY7UkmA13nlvoGxxwPopRlV8O0N9VxiMnxd59+IexZTxz0bF3gzx MENPid58Sapmg/1Fvmv1ZqLIQZitpAPh6XtHTa4RVuZc2n98D5blAHiL74xGFpql0vwRDuhpcmy ZPgUCUp18D6BWHVeUUxQpj+xSz0Q0BBXy7iiEjzSkRYT9fGyE5Itd9r7YyP+UQvXFGfmHrIAVgK w+DVgU21DPlSfJABKGBcpmFY/GG4HCot/1GKPY7PJKwx X-Google-Smtp-Source: AGHT+IFqKU96alu7CjaL28KvtseBxTAhMnoGYF0XbFMNi+uImdD9Y2RT6wbAdb2GsvFt7cnURgUy3w== X-Received: by 2002:a05:6a20:9c8c:b0:1db:822f:36d8 with SMTP id adf61e73a8af0-20445d26beamr1767342637.3.1745470253996; Wed, 23 Apr 2025 21:50:53 -0700 (PDT) From: Akihiko Odaki Date: Thu, 24 Apr 2025 13:50:14 +0900 Subject: [PATCH 4/4] meson: Use osdep_prefix for strchrnul() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250424-buildsys-v1-4-97655e3b25d7@daynix.com> References: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> In-Reply-To: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.15-dev-edae6 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=2607:f8b0:4864:20::432; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1745470325562019100 macOS SDK may have the symbol of strchrnul(), but it is actually available only on macOS 15.4 or later and that fact is codified in string.h. Include the header file using osdep_prefix to check if the function is available on the deployment target. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0a35fc3fa9fe..8ec796d835df 100644 --- a/meson.build +++ b/meson.build @@ -2193,6 +2193,7 @@ osdep_prefix =3D ''' #include #include =20 + #include #include /* Put unistd.h before time.h as that triggers localtime_r/gmtime_r * function availability on recentish Mingw-w64 platforms. */ @@ -2657,7 +2658,7 @@ config_host_data.set('HAVE_GETIFADDRS', cc.has_functi= on('getifaddrs')) config_host_data.set('HAVE_GLIB_WITH_SLICE_ALLOCATOR', glib_has_gslice) config_host_data.set('HAVE_GLIB_WITH_ALIGNED_ALLOC', glib_has_aligned_allo= c) config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependenci= es: util)) -config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul')) +config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul', prefix= : osdep_prefix)) config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) if rbd.found() config_host_data.set('HAVE_RBD_NAMESPACE_EXISTS', --=20 2.49.0