From nobody Sun Nov 24 05:54:13 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1725542352971411.20533429091336; Thu, 5 Sep 2024 06:19:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smCNF-0002CL-28; Thu, 05 Sep 2024 09:18:09 -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 1smAc2-0002r3-0M for qemu-devel@nongnu.org; Thu, 05 Sep 2024 07:25:21 -0400 Received: from 93-87-244-166.static.isp.telekom.rs ([93.87.244.166] helo=fx.arvanta.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smAc0-0003hk-7W for qemu-devel@nongnu.org; Thu, 05 Sep 2024 07:25:17 -0400 Received: from m1pro.arvanta.net (m1pro.arvanta.net [10.5.1.11]) by fx.arvanta.net (Postfix) with ESMTP id E7E294B32; Thu, 05 Sep 2024 13:25:10 +0200 (CEST) From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Milan=20P=20=2E=20Stani=C4=87?= Subject: [PATCH] util/util/cpuinfo-riscv.c: fix riscv64 build on musl libc Date: Thu, 5 Sep 2024 13:24:37 +0200 Message-ID: <20240905112440.10438-1-mps@arvanta.net> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=93.87.244.166; envelope-from=mps@arvanta.net; helo=fx.arvanta.net 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 05 Sep 2024 09:17:59 -0400 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-ZM-MESSAGEID: 1725542354560116600 build fails on musl libc (alpine linux) with this error: ../util/cpuinfo-riscv.c: In function 'cpuinfo_init': ../util/cpuinfo-riscv.c:63:21: error: '__NR_riscv_hwprobe' undeclared (firs= t use in this function); did you mean 'riscv_hwprobe'? 63 | if (syscall(__NR_riscv_hwprobe, &pair, 1, 0, NULL, 0) =3D= =3D 0 | ^~~~~~~~~~~~~~~~~~ | riscv_hwprobe ../util/cpuinfo-riscv.c:63:21: note: each undeclared identifier is reported= only once for each function it appears in ninja: subcommand failed add '#include "asm/unistd.h"' to util/cpuinfo-riscv.c fixes build Signed-off-by: Milan P. Stani=C4=87 --- util/cpuinfo-riscv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/cpuinfo-riscv.c b/util/cpuinfo-riscv.c index 497ce12680..f4779ed1fb 100644 --- a/util/cpuinfo-riscv.c +++ b/util/cpuinfo-riscv.c @@ -5,6 +5,7 @@ =20 #include "qemu/osdep.h" #include "host/cpuinfo.h" +#include "asm/unistd.h" =20 #ifdef CONFIG_ASM_HWPROBE_H #include --=20 2.46.0