From 1bdffd61212f5f44546732f24ff0efe03bf80eb4 Mon Sep 17 00:00:00 2001 From: stenstorp Date: Wed, 19 Sep 2018 14:12:06 +0930 Subject: [PATCH] findutils: fix building with glibc2.28 --- srcpkgs/findutils/patches/gnulib-freadahead.patch | 11 +++++++++++ srcpkgs/findutils/patches/gnulib-mountlist.patch | 15 +++++++++++++++ srcpkgs/findutils/patches/gnulib-stdio-impl.patch | 14 ++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 srcpkgs/findutils/patches/gnulib-freadahead.patch create mode 100644 srcpkgs/findutils/patches/gnulib-mountlist.patch create mode 100644 srcpkgs/findutils/patches/gnulib-stdio-impl.patch diff --git a/srcpkgs/findutils/patches/gnulib-freadahead.patch b/srcpkgs/findutils/patches/gnulib-freadahead.patch new file mode 100644 index 00000000000..5d8e5af28bf --- /dev/null +++ b/srcpkgs/findutils/patches/gnulib-freadahead.patch @@ -0,0 +1,11 @@ +--- gl/lib/freadahead.c ++++ gl/lib/freadahead.c +@@ -30,7 +30,7 @@ extern size_t __sreadahead (FILE *); + size_t + freadahead (FILE *fp) + { +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_write_ptr > fp->_IO_write_base) + return 0; + return (fp->_IO_read_end - fp->_IO_read_ptr) diff --git a/srcpkgs/findutils/patches/gnulib-mountlist.patch b/srcpkgs/findutils/patches/gnulib-mountlist.patch new file mode 100644 index 00000000000..bb58385a69a --- /dev/null +++ b/srcpkgs/findutils/patches/gnulib-mountlist.patch @@ -0,0 +1,15 @@ +--- gl/lib/mountlist.c ++++ gl/lib/mountlist.c +@@ -37,6 +37,12 @@ + # include + #endif + ++#if MAJOR_IN_MKDEV ++# include ++#elif MAJOR_IN_SYSMACROS ++# include ++#endif ++ + #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ + # if HAVE_SYS_UCRED_H + # include /* needed on OSF V4.0 for definition of NGROUPS, diff --git a/srcpkgs/findutils/patches/gnulib-stdio-impl.patch b/srcpkgs/findutils/patches/gnulib-stdio-impl.patch new file mode 100644 index 00000000000..e054879d577 --- /dev/null +++ b/srcpkgs/findutils/patches/gnulib-stdio-impl.patch @@ -0,0 +1,14 @@ +--- gl/lib/stdio-impl.h ++++ gl/lib/stdio-impl.h +@@ -18,6 +18,12 @@ + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + ++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this ++ problem by defining it ourselves. FIXME: Do not rely on glibc ++ internals. */ ++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN ++# define _IO_IN_BACKUP 0x100 ++#endif + + /* BSD stdio derived implementations. */