On Thu, Mar 21, 2024 at 08:59:57AM -0700, Andrii Nakryiko wrote: > On Thu, Mar 21, 2024 at 8:16 AM Arnaldo Carvalho de Melo > > dm.log/ubuntu:18.04-x-sh4:libbpf.c:5355:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > > dm.log/ubuntu:18.04-x-sh4- map->mmaped = mmap((void *)map->map_extra, bpf_map_mmap_sz(map), > > dm.log/ubuntu:18.04-x-sh4- ^ > > perfbuilder@number:~$ > > I think Namhyung mentioned as well on a chat conversation about noticing > > this on a 32-bit build on Debian. > > Fixes: 79ff13e99169ddb0 ("libbpf: Add support for bpf_arena.") > > Reported-by: Namhyung Kim <namhyung@xxxxxxxxxx> > We've already landed a similar fix in the bpf tree, see [0]. > > [0] https://patchwork.kernel.org/project/netdevbpf/patch/20240319215143.1279312-1-andrii@xxxxxxxxxx/ Great, uintptr_t looks cleaner tho, but fits the bill. - Arnaldo