> On Sep 29, 2024, at 10:27 PM, matthew green <m...@eterna23.net> wrote: > > thanks for fixing the build. > > "Robert Elz" writes: >> Module Name: src >> Committed By: kre >> Date: Mon Sep 30 01:26:48 UTC 2024 >> >> Modified Files: >> src/sys/compat/linux/common: linux_sched.c >> >> Log Message: >> Supply a missing cast, which fixes the i386 (other 32 bit too probably) >> builds. >> >> Note I used uintptr_t rather than intptr_t which other similar >> lines nearby use - the int being converted to a ptr is uint64_t >> so using unsigned seemed safer to me. Feel free to change it. > > this looks like it should use NETBSD32IPTR64(), but that uses > intptr_t for reasons i don't recall but that may matter. maybe > we need better checking in general - does linux reject this one > 32-bit platforms if 'stack' has high half set, or perhaps the code > just assigns 64-bit input to a 32-it pointer and ignores them. > > christos? do you know?
See the comment in /usr/src/sys/compat/netbsd32/netbsd32.h: * NETBSD32_POINTER_TYPE * - 32-bit pointer type, normally uint32_t but can be int32_t * for platforms which rely on sign-extension of pointers * such as SH-5. * eg: #define NETBSD32_POINTER_TYPE uint32_t And then: http://bxr.su/search?q=&defs=&refs=NETBSD32_POINTER_TYPE&path=&project=NetBSD mips and riscv use int32_t and the rest use uint32_t. christos
signature.asc
Description: Message signed with OpenPGP