1diff -r -U3 coreutils-6.11/lib/freadahead.c coreutils-6.11-patched/lib/freadahead.c
2--- coreutils-6.11/lib/freadahead.c	2008-04-17 03:59:17.000000000 -0600
3+++ coreutils-6.11-patched/lib/freadahead.c	2019-08-01 20:20:12.712193242 -0600
4@@ -19,10 +19,17 @@
5 /* Specification.  */
6 #include "freadahead.h"
7
8+/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
9+ *    problem by defining it ourselves.  FIXME: Do not rely on glibc
10+ *       internals.  */
11+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
12+# define _IO_IN_BACKUP 0x100
13+#endif
14+
15 size_t
16 freadahead (FILE *fp)
17 {
18-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
19+#if defined _IO_EOF_SEEN || defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
20   if (fp->_IO_write_ptr > fp->_IO_write_base)
21     return 0;
22   return (fp->_IO_read_end - fp->_IO_read_ptr)
23diff -r -U3 coreutils-6.11/lib/fseterr.c coreutils-6.11-patched/lib/fseterr.c
24--- coreutils-6.11/lib/fseterr.c	2008-04-17 03:59:17.000000000 -0600
25+++ coreutils-6.11-patched/lib/fseterr.c	2019-08-01 20:20:37.868480486 -0600
26@@ -27,7 +27,7 @@
27   /* Most systems provide FILE as a struct and the necessary bitmask in
28      <stdio.h>, because they need it for implementing getc() and putc() as
29      fast macros.  */
30-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
31+#if defined _IO_EOF_SEEN || defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
32   fp->_flags |= _IO_ERR_SEEN;
33 #elif defined __sferror             /* FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */
34   fp->_flags |= __SERR;
35