diff options
3 files changed, 382 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils/0001-fflush-adjust-to-glibc-2.28-libio.h-removal.patch b/meta/recipes-core/coreutils/coreutils/0001-fflush-adjust-to-glibc-2.28-libio.h-removal.patch new file mode 100644 index 0000000000..110b34372d --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils/0001-fflush-adjust-to-glibc-2.28-libio.h-removal.patch | |||
| @@ -0,0 +1,193 @@ | |||
| 1 | From 269a8987224ec62b7a9aa6202772b07d5be424d2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de> | ||
| 3 | Date: Mon, 11 Mar 2019 16:00:33 +0100 | ||
| 4 | Subject: [PATCH 1/2] fflush: adjust to glibc 2.28 libio.h removal | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Backport of patch: | ||
| 10 | 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e | ||
| 11 | Paul Eggert <eggert@cs.ucla.edu> | ||
| 12 | fflush: adjust to glibc 2.28 libio.h removal | ||
| 13 | |||
| 14 | Upstream-Status: Backport [master] | ||
| 15 | |||
| 16 | Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> | ||
| 17 | --- | ||
| 18 | lib/fflush.c | 6 +++--- | ||
| 19 | lib/fpending.c | 2 +- | ||
| 20 | lib/fpurge.c | 2 +- | ||
| 21 | lib/freadahead.c | 2 +- | ||
| 22 | lib/freading.c | 2 +- | ||
| 23 | lib/freadptr.c | 2 +- | ||
| 24 | lib/freadseek.c | 2 +- | ||
| 25 | lib/fseeko.c | 4 ++-- | ||
| 26 | lib/fseterr.c | 2 +- | ||
| 27 | lib/stdio-impl.h | 6 ++++++ | ||
| 28 | 10 files changed, 18 insertions(+), 12 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/lib/fflush.c b/lib/fflush.c | ||
| 31 | index 4e65692644b1..c16da5fdcf23 100644 | ||
| 32 | --- a/lib/fflush.c | ||
| 33 | +++ b/lib/fflush.c | ||
| 34 | @@ -33,7 +33,7 @@ | ||
| 35 | #undef fflush | ||
| 36 | |||
| 37 | |||
| 38 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 39 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 40 | |||
| 41 | /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ | ||
| 42 | static void | ||
| 43 | @@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) | ||
| 44 | |||
| 45 | #endif | ||
| 46 | |||
| 47 | -#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) | ||
| 48 | +#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) | ||
| 49 | |||
| 50 | # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT | ||
| 51 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 52 | @@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) | ||
| 53 | if (stream == NULL || ! freading (stream)) | ||
| 54 | return fflush (stream); | ||
| 55 | |||
| 56 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 57 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 58 | |||
| 59 | clear_ungetc_buffer_preserving_position (stream); | ||
| 60 | |||
| 61 | diff --git a/lib/fpending.c b/lib/fpending.c | ||
| 62 | index 5811a4a74750..9e21a165e220 100644 | ||
| 63 | --- a/lib/fpending.c | ||
| 64 | +++ b/lib/fpending.c | ||
| 65 | @@ -32,7 +32,7 @@ __fpending (FILE *fp) | ||
| 66 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 67 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 68 | fast macros. */ | ||
| 69 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 70 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 71 | return fp->_IO_write_ptr - fp->_IO_write_base; | ||
| 72 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 73 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 74 | diff --git a/lib/fpurge.c b/lib/fpurge.c | ||
| 75 | index 408b8fcbb3b8..3a160004d49d 100644 | ||
| 76 | --- a/lib/fpurge.c | ||
| 77 | +++ b/lib/fpurge.c | ||
| 78 | @@ -62,7 +62,7 @@ fpurge (FILE *fp) | ||
| 79 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 80 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 81 | fast macros. */ | ||
| 82 | -# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 83 | +# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 84 | fp->_IO_read_end = fp->_IO_read_ptr; | ||
| 85 | fp->_IO_write_ptr = fp->_IO_write_base; | ||
| 86 | /* Avoid memory leak when there is an active ungetc buffer. */ | ||
| 87 | diff --git a/lib/freadahead.c b/lib/freadahead.c | ||
| 88 | index f335f041ee5e..e7cb77b6722b 100644 | ||
| 89 | --- a/lib/freadahead.c | ||
| 90 | +++ b/lib/freadahead.c | ||
| 91 | @@ -30,7 +30,7 @@ extern size_t __sreadahead (FILE *); | ||
| 92 | size_t | ||
| 93 | freadahead (FILE *fp) | ||
| 94 | { | ||
| 95 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 96 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 97 | if (fp->_IO_write_ptr > fp->_IO_write_base) | ||
| 98 | return 0; | ||
| 99 | return (fp->_IO_read_end - fp->_IO_read_ptr) | ||
| 100 | diff --git a/lib/freading.c b/lib/freading.c | ||
| 101 | index 78140d27bfef..c9d33449e948 100644 | ||
| 102 | --- a/lib/freading.c | ||
| 103 | +++ b/lib/freading.c | ||
| 104 | @@ -31,7 +31,7 @@ freading (FILE *fp) | ||
| 105 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 106 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 107 | fast macros. */ | ||
| 108 | -# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 109 | +# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 110 | return ((fp->_flags & _IO_NO_WRITES) != 0 | ||
| 111 | || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 | ||
| 112 | && fp->_IO_read_base != NULL)); | ||
| 113 | diff --git a/lib/freadptr.c b/lib/freadptr.c | ||
| 114 | index e4cc0b02fba2..aba8dd5964fc 100644 | ||
| 115 | --- a/lib/freadptr.c | ||
| 116 | +++ b/lib/freadptr.c | ||
| 117 | @@ -29,7 +29,7 @@ freadptr (FILE *fp, size_t *sizep) | ||
| 118 | size_t size; | ||
| 119 | |||
| 120 | /* Keep this code in sync with freadahead! */ | ||
| 121 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 122 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 123 | if (fp->_IO_write_ptr > fp->_IO_write_base) | ||
| 124 | return NULL; | ||
| 125 | size = fp->_IO_read_end - fp->_IO_read_ptr; | ||
| 126 | diff --git a/lib/freadseek.c b/lib/freadseek.c | ||
| 127 | index fcecba6829c5..98726f845f88 100644 | ||
| 128 | --- a/lib/freadseek.c | ||
| 129 | +++ b/lib/freadseek.c | ||
| 130 | @@ -36,7 +36,7 @@ freadptrinc (FILE *fp, size_t increment) | ||
| 131 | /* Keep this code in sync with freadptr! */ | ||
| 132 | #if HAVE___FREADPTRINC /* musl libc */ | ||
| 133 | __freadptrinc (fp, increment); | ||
| 134 | -#elif defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 135 | +#elif defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 136 | fp->_IO_read_ptr += increment; | ||
| 137 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 138 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 139 | diff --git a/lib/fseeko.c b/lib/fseeko.c | ||
| 140 | index d0f24d8a838f..0ae2b153cff5 100644 | ||
| 141 | --- a/lib/fseeko.c | ||
| 142 | +++ b/lib/fseeko.c | ||
| 143 | @@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence) | ||
| 144 | #endif | ||
| 145 | |||
| 146 | /* These tests are based on fpurge.c. */ | ||
| 147 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 148 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 149 | if (fp->_IO_read_end == fp->_IO_read_ptr | ||
| 150 | && fp->_IO_write_ptr == fp->_IO_write_base | ||
| 151 | && fp->_IO_save_base == NULL) | ||
| 152 | @@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence) | ||
| 153 | return -1; | ||
| 154 | } | ||
| 155 | |||
| 156 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 157 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 158 | fp->_flags &= ~_IO_EOF_SEEN; | ||
| 159 | fp->_offset = pos; | ||
| 160 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 161 | diff --git a/lib/fseterr.c b/lib/fseterr.c | ||
| 162 | index 739e5453d04e..d998619771f3 100644 | ||
| 163 | --- a/lib/fseterr.c | ||
| 164 | +++ b/lib/fseterr.c | ||
| 165 | @@ -29,7 +29,7 @@ fseterr (FILE *fp) | ||
| 166 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 167 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 168 | fast macros. */ | ||
| 169 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 170 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 171 | fp->_flags |= _IO_ERR_SEEN; | ||
| 172 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 173 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 174 | diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h | ||
| 175 | index 329801ad23b0..eeaabab66b2f 100644 | ||
| 176 | --- a/lib/stdio-impl.h | ||
| 177 | +++ b/lib/stdio-impl.h | ||
| 178 | @@ -18,6 +18,12 @@ | ||
| 179 | the same implementation of stdio extension API, except that some fields | ||
| 180 | have different naming conventions, or their access requires some casts. */ | ||
| 181 | |||
| 182 | +/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this | ||
| 183 | + problem by defining it ourselves. FIXME: Do not rely on glibc | ||
| 184 | + internals. */ | ||
| 185 | +#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN | ||
| 186 | +# define _IO_IN_BACKUP 0x100 | ||
| 187 | +#endif | ||
| 188 | |||
| 189 | /* BSD stdio derived implementations. */ | ||
| 190 | |||
| 191 | -- | ||
| 192 | 2.20.1 | ||
| 193 | |||
diff --git a/meta/recipes-core/coreutils/coreutils/0002-fflush-be-more-paranoid-about-libio.h-change.patch b/meta/recipes-core/coreutils/coreutils/0002-fflush-be-more-paranoid-about-libio.h-change.patch new file mode 100644 index 0000000000..8cc7d63779 --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils/0002-fflush-be-more-paranoid-about-libio.h-change.patch | |||
| @@ -0,0 +1,187 @@ | |||
| 1 | From 72a2dae68c9101d80abdce8c4e41f7e562bd2399 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de> | ||
| 3 | Date: Wed, 13 Mar 2019 14:09:39 +0100 | ||
| 4 | Subject: [PATCH 2/2] fflush: be more paranoid about libio.h change | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Backport of patch: | ||
| 10 | 74d9d6a293d7462dea8f83e7fc5ac792e956a0ad | ||
| 11 | Paul Eggert <eggert@cs.ucla.edu> | ||
| 12 | fflush: be more paranoid about libio.h change | ||
| 13 | |||
| 14 | Upstream-Status: Backport [master] | ||
| 15 | |||
| 16 | Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> | ||
| 17 | --- | ||
| 18 | lib/fflush.c | 9 ++++++--- | ||
| 19 | lib/fpending.c | 3 ++- | ||
| 20 | lib/fpurge.c | 3 ++- | ||
| 21 | lib/freadahead.c | 3 ++- | ||
| 22 | lib/freading.c | 3 ++- | ||
| 23 | lib/freadptr.c | 3 ++- | ||
| 24 | lib/freadseek.c | 3 ++- | ||
| 25 | lib/fseeko.c | 6 ++++-- | ||
| 26 | lib/fseterr.c | 3 ++- | ||
| 27 | 9 files changed, 24 insertions(+), 12 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/lib/fflush.c b/lib/fflush.c | ||
| 30 | index c16da5fdcf23..b69206296e9a 100644 | ||
| 31 | --- a/lib/fflush.c | ||
| 32 | +++ b/lib/fflush.c | ||
| 33 | @@ -33,7 +33,8 @@ | ||
| 34 | #undef fflush | ||
| 35 | |||
| 36 | |||
| 37 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 38 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 39 | +/* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 40 | |||
| 41 | /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ | ||
| 42 | static void | ||
| 43 | @@ -72,7 +73,8 @@ clear_ungetc_buffer (FILE *fp) | ||
| 44 | |||
| 45 | #endif | ||
| 46 | |||
| 47 | -#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) | ||
| 48 | +#if ! (defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1) | ||
| 49 | +/* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 50 | |||
| 51 | # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT | ||
| 52 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 53 | @@ -148,7 +150,8 @@ rpl_fflush (FILE *stream) | ||
| 54 | if (stream == NULL || ! freading (stream)) | ||
| 55 | return fflush (stream); | ||
| 56 | |||
| 57 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 58 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 59 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 60 | |||
| 61 | clear_ungetc_buffer_preserving_position (stream); | ||
| 62 | |||
| 63 | diff --git a/lib/fpending.c b/lib/fpending.c | ||
| 64 | index 9e21a165e220..0c3b931dba9a 100644 | ||
| 65 | --- a/lib/fpending.c | ||
| 66 | +++ b/lib/fpending.c | ||
| 67 | @@ -32,7 +32,8 @@ __fpending (FILE *fp) | ||
| 68 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 69 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 70 | fast macros. */ | ||
| 71 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 72 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 73 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 74 | return fp->_IO_write_ptr - fp->_IO_write_base; | ||
| 75 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 76 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 77 | diff --git a/lib/fpurge.c b/lib/fpurge.c | ||
| 78 | index 3a160004d49d..4558ab9a0783 100644 | ||
| 79 | --- a/lib/fpurge.c | ||
| 80 | +++ b/lib/fpurge.c | ||
| 81 | @@ -62,7 +62,8 @@ fpurge (FILE *fp) | ||
| 82 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 83 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 84 | fast macros. */ | ||
| 85 | -# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 86 | +# if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 87 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 88 | fp->_IO_read_end = fp->_IO_read_ptr; | ||
| 89 | fp->_IO_write_ptr = fp->_IO_write_base; | ||
| 90 | /* Avoid memory leak when there is an active ungetc buffer. */ | ||
| 91 | diff --git a/lib/freadahead.c b/lib/freadahead.c | ||
| 92 | index e7cb77b6722b..496686042d1e 100644 | ||
| 93 | --- a/lib/freadahead.c | ||
| 94 | +++ b/lib/freadahead.c | ||
| 95 | @@ -30,7 +30,8 @@ extern size_t __sreadahead (FILE *); | ||
| 96 | size_t | ||
| 97 | freadahead (FILE *fp) | ||
| 98 | { | ||
| 99 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 100 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 101 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 102 | if (fp->_IO_write_ptr > fp->_IO_write_base) | ||
| 103 | return 0; | ||
| 104 | return (fp->_IO_read_end - fp->_IO_read_ptr) | ||
| 105 | diff --git a/lib/freading.c b/lib/freading.c | ||
| 106 | index c9d33449e948..5e66df1dc7dd 100644 | ||
| 107 | --- a/lib/freading.c | ||
| 108 | +++ b/lib/freading.c | ||
| 109 | @@ -31,7 +31,8 @@ freading (FILE *fp) | ||
| 110 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 111 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 112 | fast macros. */ | ||
| 113 | -# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 114 | +# if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 115 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 116 | return ((fp->_flags & _IO_NO_WRITES) != 0 | ||
| 117 | || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 | ||
| 118 | && fp->_IO_read_base != NULL)); | ||
| 119 | diff --git a/lib/freadptr.c b/lib/freadptr.c | ||
| 120 | index aba8dd5964fc..e82b41e3f4d9 100644 | ||
| 121 | --- a/lib/freadptr.c | ||
| 122 | +++ b/lib/freadptr.c | ||
| 123 | @@ -29,7 +29,8 @@ freadptr (FILE *fp, size_t *sizep) | ||
| 124 | size_t size; | ||
| 125 | |||
| 126 | /* Keep this code in sync with freadahead! */ | ||
| 127 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 128 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 129 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 130 | if (fp->_IO_write_ptr > fp->_IO_write_base) | ||
| 131 | return NULL; | ||
| 132 | size = fp->_IO_read_end - fp->_IO_read_ptr; | ||
| 133 | diff --git a/lib/freadseek.c b/lib/freadseek.c | ||
| 134 | index 98726f845f88..f547bfd4257b 100644 | ||
| 135 | --- a/lib/freadseek.c | ||
| 136 | +++ b/lib/freadseek.c | ||
| 137 | @@ -36,7 +36,8 @@ freadptrinc (FILE *fp, size_t increment) | ||
| 138 | /* Keep this code in sync with freadptr! */ | ||
| 139 | #if HAVE___FREADPTRINC /* musl libc */ | ||
| 140 | __freadptrinc (fp, increment); | ||
| 141 | -#elif defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 142 | +#elif defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 143 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 144 | fp->_IO_read_ptr += increment; | ||
| 145 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 146 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 147 | diff --git a/lib/fseeko.c b/lib/fseeko.c | ||
| 148 | index 0ae2b153cff5..ee8efa49ac34 100644 | ||
| 149 | --- a/lib/fseeko.c | ||
| 150 | +++ b/lib/fseeko.c | ||
| 151 | @@ -47,7 +47,8 @@ fseeko (FILE *fp, off_t offset, int whence) | ||
| 152 | #endif | ||
| 153 | |||
| 154 | /* These tests are based on fpurge.c. */ | ||
| 155 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 156 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 157 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 158 | if (fp->_IO_read_end == fp->_IO_read_ptr | ||
| 159 | && fp->_IO_write_ptr == fp->_IO_write_base | ||
| 160 | && fp->_IO_save_base == NULL) | ||
| 161 | @@ -123,7 +124,8 @@ fseeko (FILE *fp, off_t offset, int whence) | ||
| 162 | return -1; | ||
| 163 | } | ||
| 164 | |||
| 165 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 166 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 167 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 168 | fp->_flags &= ~_IO_EOF_SEEN; | ||
| 169 | fp->_offset = pos; | ||
| 170 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 171 | diff --git a/lib/fseterr.c b/lib/fseterr.c | ||
| 172 | index d998619771f3..23f4e3593800 100644 | ||
| 173 | --- a/lib/fseterr.c | ||
| 174 | +++ b/lib/fseterr.c | ||
| 175 | @@ -29,7 +29,8 @@ fseterr (FILE *fp) | ||
| 176 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 177 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 178 | fast macros. */ | ||
| 179 | -#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 180 | +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 | ||
| 181 | + /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 182 | fp->_flags |= _IO_ERR_SEEN; | ||
| 183 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 184 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ | ||
| 185 | -- | ||
| 186 | 2.20.1 | ||
| 187 | |||
diff --git a/meta/recipes-core/coreutils/coreutils_8.29.bb b/meta/recipes-core/coreutils/coreutils_8.29.bb index b0572afdc0..3c72bdd750 100644 --- a/meta/recipes-core/coreutils/coreutils_8.29.bb +++ b/meta/recipes-core/coreutils/coreutils_8.29.bb | |||
| @@ -21,6 +21,8 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ | |||
| 21 | file://0001-local.mk-fix-cross-compiling-problem.patch \ | 21 | file://0001-local.mk-fix-cross-compiling-problem.patch \ |
| 22 | file://CVE-2017-18018-1.patch \ | 22 | file://CVE-2017-18018-1.patch \ |
| 23 | file://CVE-2017-18018-2.patch \ | 23 | file://CVE-2017-18018-2.patch \ |
| 24 | file://0001-fflush-adjust-to-glibc-2.28-libio.h-removal.patch \ | ||
| 25 | file://0002-fflush-be-more-paranoid-about-libio.h-change.patch \ | ||
| 24 | " | 26 | " |
| 25 | 27 | ||
| 26 | SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303" | 28 | SRC_URI[md5sum] = "960cfe75a42c9907c71439f8eb436303" |
