On 2021-02-14 05:41, Ilya Lipnitskiy wrote: > The following commit removed _STAT_VER definitions from glibc: > https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8ed005daf0ab03e142500324a34087ce179ae78e > > That subsequently broke fakeroot: > https://bugs.archlinux.org/task/69572 > https://bugzilla.redhat.com/show_bug.cgi?id=1889862#c13 > https://forum.openwrt.org/t/unable-to-build-toolchain-fakeroot-fails-perhaps-others-after-it/87966 > > Make the patch based on Jan Pazdziora's suggestion from here: > https://lists.fedoraproject.org/archives/list/de...@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/ > > Add wrappers for newly exported symbols in glibc. > > Apply patch from Debian to fix warnings in fts_read and fts_children: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676428 > https://sources.debian.org/patches/fakeroot/1.25.3-1.1/eglibc-fts-without-LFS/ > > Fix __xmknod{,at} dev pointer argument. Switch default to assume * and > not the absence of *. On glibc 2.33+, there is no definition for these > functions in header files, so the compile test doesn't work. But, we > can default to using the pointer (as is the case with newer glibc), and > use the header file on older platforms to fail the test and use no pointer. > > Tested on my x86_64 Arch Linux machine, fakeroot unit tests pass. > Also tested by building various .ipks and examining the tar contents, to > ensure that the owner uid/gid was 0/0. > > Signed-off-by: Ilya Lipnitskiy <ilya.lipnits...@gmail.com> > --- > .../300-glibc-2.33-compatibility.patch | 145 ++++++++++++++++++ > 1 file changed, 145 insertions(+) > create mode 100644 tools/fakeroot/patches/300-glibc-2.33-compatibility.patch > > diff --git a/tools/fakeroot/patches/300-glibc-2.33-compatibility.patch > b/tools/fakeroot/patches/300-glibc-2.33-compatibility.patch > new file mode 100644 > index 0000000000..a460cace0c > --- /dev/null > +++ b/tools/fakeroot/patches/300-glibc-2.33-compatibility.patch > @@ -0,0 +1,145 @@ > +--- a/libfakeroot.c > ++++ b/libfakeroot.c > +@@ -1358,6 +1368,54 @@ int renameat(int olddir_fd, const char * > + #endif /* HAVE_FSTATAT */ > + > + > ++#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33) Turns out combining those two into a single #if was not such a good idea. It breaks on macOS, because __GLIBC_PREREQ is evaluated though __GLIBC__ is not defined. Splitting it into two #if lines makes things work again. The change to the __xmknod dev pointer argument checks also broke. I've pushed a fix for both, please check it and submit it upstream.
Thanks, - Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel