Open oskarirauta opened 6 months ago
musl had a change where stat64 needs LARGEFILE64 defined or something like that.
That would probably be better solution instead of patching it :) Had forgotten all about it, since I've been pretty occupied elsewhere lately.
It's often used to check that if building system with musl instead of glibc, then apply -DLARGEFILE64_SOURCE to cflags; problem is, that it won't work this time- for me at least, since my build host is also using musl and this package is built for both, host and target :/ so I'd need to apply it to host_cflags also, but there's no way to detect host musl (actually there exists a working script, but it's not included with default build system)
even though musl attempts to mimic standards; they should had made something like #ifdef __MUSL
exist..
EDIT: I cooked up a work-around... This should work for both, host musl and target..
ifneq ($(CONFIG_USE_MUSL),)
TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
endif
IS_MUSL=$(shell if [ -n "$$(ldd /bin/sh | grep musl)" ]; then echo " -D_LARGEFILE64_SOURCE; fi)
HOST_CFLAGS+=$(IS_MUSL)
Maintainer: @Andy2244 @neheb @ffontaine Environment: x86_64 latest git
Description:
Would seem like a issue with musl maybe? Adding
#define stat64 stat
makes it build without problem.build log: