From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [138.197.159.143]) by gnuweeb.org (Postfix) with ESMTPSA id B95A57E328; Tue, 26 Jul 2022 11:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1658834360; bh=k/V5rIfa9ylnDktf7+NicTFP9w4TxSG4KpRr5gBkXeY=; h=From:To:Cc:Subject:Date:From; b=bz0D3whobmJcCLVtTz6EmWuzEJg0HhsOO0DVz+Js5wMgn51WjqOQFDWMbNggGZPoL qZlQwfMH4nIqAswlelpgXg/EP9NZoP2QwTOj5qkZkyq2oieM8vMF9HcCYDhgQoOyMU hVlaEHww8vSeSubdyZ4D+tcxty31cc/CI9yADGoSVOnHw3cpDPFMMy31zxCNgpNAuB jgzz5Eieshh8rnFzkq2UtQ+FOwrF2iHfvteF8g7InuZDbQOm3saqy47PaxYFm4I3SD CKCnNjERtLZOJT/JHxzx2n6PJbY45ikz4B6+s01DERDXCrZaMpOPp25vvXdDe2yeo0 Q9yaqg0IzcjRA== From: Alviro Iskandar Setiawan To: Jens Axboe Cc: Alviro Iskandar Setiawan , io-uring Mailing List , Ammar Faizi , GNU/Weeb Mailing List Subject: [PATCH liburing] arch/syscall: Use __NR_mmap2 existence for preprocessor condition Date: Tue, 26 Jul 2022 11:18:51 +0000 Message-Id: <20220726111851.3608291-1-alviro.iskandar@gnuweeb.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Now __NR_mmap2 is only used for i386. But it is also needed for other archs like ARM and RISCV32. Decide to use it based on the __NR_mmap2 definition as it's not defined on other archs. Currently, this has no effect because other archs use the generic mmap definition from libc. Signed-off-by: Alviro Iskandar Setiawan --- src/arch/syscall-defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/syscall-defs.h b/src/arch/syscall-defs.h index 9ddac45..374aa0d 100644 --- a/src/arch/syscall-defs.h +++ b/src/arch/syscall-defs.h @@ -27,7 +27,7 @@ static inline void *__sys_mmap(void *addr, size_t length, int prot, int flags, { int nr; -#if defined(__i386__) +#if defined(__NR_mmap2) nr = __NR_mmap2; offset >>= 12; #else -- Alviro Iskandar Setiawan