On Sat, Oct 22, 2022 at 6:45 AM Sören Tempel wrote: > > PING. > > soeren@soeren-tempel.net wrote: > > From: Sören Tempel > > > > On glibc-based systems, off_t is a 32-bit type on 32-bit systems and a > > 64-bit type on 64-bit systems by default. However, on systems using musl > > libc off_t is unconditionally a 64-bit type. As such, it is insufficient > > to use a uintptr type for the mmap offset parameter. > > > > Presently, the (incorrect) mmap declaration causes a libgo run-time > > failure on 32-bit musl systems (fatal error: runtime: cannot allocate > > memory). This commit fixes this run-time error. > > > > Signed-off-by: Sören Tempel > > --- > > This implements what has been proposed by Ian in a GitHub comment > > https://github.com/golang/go/issues/51280#issuecomment-1046322011 > > > > I don't have access to a 32-bit glibc system to test this on but > > this does seem to work fine on 32-bit and 64-bit musl systems. Thanks. Committed as follows using _libgo_off_t_type to avoid the confusion between off_t and off64_t. Sorry for the delay. Ian