From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BC50D158083 for ; Sun, 22 Sep 2024 04:30:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD370E29AE; Sun, 22 Sep 2024 04:30:48 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F2B19E29AE for ; Sun, 22 Sep 2024 04:30:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 91FA0343170 for ; Sun, 22 Sep 2024 04:30:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DC8CE1CB1 for ; Sun, 22 Sep 2024 04:30:44 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1726979442.f80b5effb263c13865a958d395ec65df0ad930a1.sam@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: paxelf.c X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f80b5effb263c13865a958d395ec65df0ad930a1 X-VCS-Branch: master Date: Sun, 22 Sep 2024 04:30:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cefd7c4c-312f-4001-a7ba-5f0aa7032367 X-Archives-Hash: 6086c633c347c657236c79d3624992ae commit: f80b5effb263c13865a958d395ec65df0ad930a1 Author: Zach van Rijn zv io> AuthorDate: Tue Sep 3 16:31:15 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Sep 22 04:30:42 2024 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=f80b5eff paxelf: use correct format string On 32-bit platforms, mmap() larger than 2GB may fail. This patch ensures that the correct size is printed and provides parity with commit 90a0c6affc9b2fe9ebd6ba3cf3ee9fbcc1fc5835. Signed-off-by: Zach van Rijn zv.io> Closes: https://github.com/gentoo/pax-utils/pull/18 Signed-off-by: Sam James gentoo.org> paxelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paxelf.c b/paxelf.c index 599d54f..795971a 100644 --- a/paxelf.c +++ b/paxelf.c @@ -684,7 +684,7 @@ elfobj *_readelf_fd(const char *filename, int fd, size_t len, int read_only) buffer = mmap(0, len, PROT_READ | (read_only ? 0 : PROT_WRITE), (read_only ? MAP_PRIVATE : MAP_SHARED), fd, 0); if (buffer == MAP_FAILED) { - warn("mmap on '%s' of %li bytes failed :(", filename, (unsigned long)len); + warn("mmap on '%s' of %zu bytes failed :(", filename, len); return NULL; }