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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B0C4F15813A for ; Wed, 08 Jan 2025 02:12:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9BF00E0817; Wed, 08 Jan 2025 02:12:55 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 81CA0E0817 for ; Wed, 08 Jan 2025 02:12:55 +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 B717D33BEA5 for ; Wed, 08 Jan 2025 02:12:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F33D1D60 for ; Wed, 08 Jan 2025 02:12:53 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1736280385.e03c865b4837f0f3699499a77b31fbae21b19b77.floppym@gentoo> Subject: [gentoo-commits] proj/sandbox:stable-2.x commit in: libsandbox/, / X-VCS-Repository: proj/sandbox X-VCS-Files: configure.ac libsandbox/memory.c X-VCS-Directories: libsandbox/ / X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: e03c865b4837f0f3699499a77b31fbae21b19b77 X-VCS-Branch: stable-2.x Date: Wed, 08 Jan 2025 02:12:53 +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: 304752a7-10f5-4f8b-9085-529de6108de7 X-Archives-Hash: c31dd0397e64972e3ebff78e61d8d6d8 commit: e03c865b4837f0f3699499a77b31fbae21b19b77 Author: Mike Gilbert gentoo org> AuthorDate: Tue Jan 7 19:52:39 2025 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Tue Jan 7 20:06:25 2025 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=e03c865b libsandbox: use mmap64 when available We build libsandbox with _FILE_OFFSET_BITS=64, so we need to call dlsym("mmap64") to get the right function from glibc. Signed-off-by: Mike Gilbert gentoo.org> configure.ac | 1 + libsandbox/memory.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 2835794..0ada7d8 100644 --- a/configure.ac +++ b/configure.ac @@ -211,6 +211,7 @@ AC_CHECK_FUNCS_ONCE(m4_flatten([ mkstemp64 mkstemps mkstemps64 + mmap64 open64 openat openat64 diff --git a/libsandbox/memory.c b/libsandbox/memory.c index a8f4d4b..69aa972 100644 --- a/libsandbox/memory.c +++ b/libsandbox/memory.c @@ -25,7 +25,11 @@ static void *(*_sb_mmap)(void *addr, size_t length, int prot, int flags, int fd, static void *sb_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) { if (!_sb_mmap) +#ifdef HAVE_MMAP64 + _sb_mmap = get_dlsym("mmap64", NULL); +#else _sb_mmap = get_dlsym("mmap", NULL); +#endif return _sb_mmap(addr, length, prot, flags, fd, offset); } #define mmap sb_mmap 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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3212C15813A for ; Tue, 14 Jan 2025 04:38:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4666E0822; Tue, 14 Jan 2025 04:38:26 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B87CAE0822 for ; Tue, 14 Jan 2025 04:38:26 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D53AF34072E for ; Tue, 14 Jan 2025 04:38:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 222AF215F for ; Tue, 14 Jan 2025 04:38:22 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1736280385.e03c865b4837f0f3699499a77b31fbae21b19b77.floppym@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: /, libsandbox/ X-VCS-Repository: proj/sandbox X-VCS-Files: configure.ac libsandbox/memory.c X-VCS-Directories: libsandbox/ / X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: e03c865b4837f0f3699499a77b31fbae21b19b77 X-VCS-Branch: master Date: Tue, 14 Jan 2025 04:38:22 +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: d297d726-786f-4ab4-8982-a83947948907 X-Archives-Hash: 70b1f3c3050f2d99fc7908b16ec79e73 Message-ID: <20250114043822.fLBN1yAh7xcYsD6q0cHfpDxgJrtYgolIdchOIvSo8YA@z> commit: e03c865b4837f0f3699499a77b31fbae21b19b77 Author: Mike Gilbert gentoo org> AuthorDate: Tue Jan 7 19:52:39 2025 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Tue Jan 7 20:06:25 2025 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=e03c865b libsandbox: use mmap64 when available We build libsandbox with _FILE_OFFSET_BITS=64, so we need to call dlsym("mmap64") to get the right function from glibc. Signed-off-by: Mike Gilbert gentoo.org> configure.ac | 1 + libsandbox/memory.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 2835794..0ada7d8 100644 --- a/configure.ac +++ b/configure.ac @@ -211,6 +211,7 @@ AC_CHECK_FUNCS_ONCE(m4_flatten([ mkstemp64 mkstemps mkstemps64 + mmap64 open64 openat openat64 diff --git a/libsandbox/memory.c b/libsandbox/memory.c index a8f4d4b..69aa972 100644 --- a/libsandbox/memory.c +++ b/libsandbox/memory.c @@ -25,7 +25,11 @@ static void *(*_sb_mmap)(void *addr, size_t length, int prot, int flags, int fd, static void *sb_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) { if (!_sb_mmap) +#ifdef HAVE_MMAP64 + _sb_mmap = get_dlsym("mmap64", NULL); +#else _sb_mmap = get_dlsym("mmap", NULL); +#endif return _sb_mmap(addr, length, prot, flags, fd, offset); } #define mmap sb_mmap