summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-06 15:57:00 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-16 16:33:09 +0000
commit1baed89cdb48940482882c1ef437a5f5e1952cd5 (patch)
treea3bd49de271c39fa91bff3e579d404135ecda03d /meta
parent24132c45bcefee4fa1d9de11da1c636ee7584832 (diff)
downloadpoky-1baed89cdb48940482882c1ef437a5f5e1952cd5.tar.gz
m4: Workaround gnulib's fseeko.c implementation
exposed by glibc 2.28 for details see https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html (From OE-Core rev: acca7f964bf9c21f3777085563a7928b8246f17f) (From OE-Core rev: 4cbfd526eebb2ff0a15042094e972e132deb985e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/m4/m4-1.4.18.inc1
-rw-r--r--meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch129
2 files changed, 130 insertions, 0 deletions
diff --git a/meta/recipes-devtools/m4/m4-1.4.18.inc b/meta/recipes-devtools/m4/m4-1.4.18.inc
index ee8bee446b..a6cef6f328 100644
--- a/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -9,6 +9,7 @@ inherit autotools texinfo
9SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ 9SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
10 file://ac_config_links.patch \ 10 file://ac_config_links.patch \
11 file://remove-gets.patch \ 11 file://remove-gets.patch \
12 file://m4-1.4.18-glibc-change-work-around.patch \
12 " 13 "
13 14
14SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch" 15SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
diff --git a/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch b/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
new file mode 100644
index 0000000000..72e7ae2080
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
@@ -0,0 +1,129 @@
1update for glibc libio.h removal in 2.28+
2
3see
4https://src.fedoraproject.org/rpms/m4/c/814d592134fad36df757f9a61422d164ea2c6c9b?branch=master
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8Index: m4-1.4.18/lib/fflush.c
9===================================================================
10--- m4-1.4.18.orig/lib/fflush.c
11+++ m4-1.4.18/lib/fflush.c
12@@ -33,7 +33,7 @@
13 #undef fflush
14
15
16-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
17+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
18
19 /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
20 static void
21@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
22
23 #endif
24
25-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
26+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
27
28 # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
29 /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
30@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
31 if (stream == NULL || ! freading (stream))
32 return fflush (stream);
33
34-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
35+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
36
37 clear_ungetc_buffer_preserving_position (stream);
38
39Index: m4-1.4.18/lib/fpending.c
40===================================================================
41--- m4-1.4.18.orig/lib/fpending.c
42+++ m4-1.4.18/lib/fpending.c
43@@ -32,7 +32,7 @@ __fpending (FILE *fp)
44 /* Most systems provide FILE as a struct and the necessary bitmask in
45 <stdio.h>, because they need it for implementing getc() and putc() as
46 fast macros. */
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 return fp->_IO_write_ptr - fp->_IO_write_base;
50 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
51 /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
52Index: m4-1.4.18/lib/fpurge.c
53===================================================================
54--- m4-1.4.18.orig/lib/fpurge.c
55+++ m4-1.4.18/lib/fpurge.c
56@@ -62,7 +62,7 @@ fpurge (FILE *fp)
57 /* Most systems provide FILE as a struct and the necessary bitmask in
58 <stdio.h>, because they need it for implementing getc() and putc() as
59 fast macros. */
60-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
61+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
62 fp->_IO_read_end = fp->_IO_read_ptr;
63 fp->_IO_write_ptr = fp->_IO_write_base;
64 /* Avoid memory leak when there is an active ungetc buffer. */
65Index: m4-1.4.18/lib/freadahead.c
66===================================================================
67--- m4-1.4.18.orig/lib/freadahead.c
68+++ m4-1.4.18/lib/freadahead.c
69@@ -25,7 +25,7 @@
70 size_t
71 freadahead (FILE *fp)
72 {
73-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
74+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
75 if (fp->_IO_write_ptr > fp->_IO_write_base)
76 return 0;
77 return (fp->_IO_read_end - fp->_IO_read_ptr)
78Index: m4-1.4.18/lib/freading.c
79===================================================================
80--- m4-1.4.18.orig/lib/freading.c
81+++ m4-1.4.18/lib/freading.c
82@@ -31,7 +31,7 @@ freading (FILE *fp)
83 /* Most systems provide FILE as a struct and the necessary bitmask in
84 <stdio.h>, because they need it for implementing getc() and putc() as
85 fast macros. */
86-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
87+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
88 return ((fp->_flags & _IO_NO_WRITES) != 0
89 || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
90 && fp->_IO_read_base != NULL));
91Index: m4-1.4.18/lib/fseeko.c
92===================================================================
93--- m4-1.4.18.orig/lib/fseeko.c
94+++ m4-1.4.18/lib/fseeko.c
95@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
96 #endif
97
98 /* These tests are based on fpurge.c. */
99-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
100+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
101 if (fp->_IO_read_end == fp->_IO_read_ptr
102 && fp->_IO_write_ptr == fp->_IO_write_base
103 && fp->_IO_save_base == NULL)
104@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when
105 return -1;
106 }
107
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 fp->_flags &= ~_IO_EOF_SEEN;
111 fp->_offset = pos;
112 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
113Index: m4-1.4.18/lib/stdio-impl.h
114===================================================================
115--- m4-1.4.18.orig/lib/stdio-impl.h
116+++ m4-1.4.18/lib/stdio-impl.h
117@@ -18,6 +18,12 @@
118 the same implementation of stdio extension API, except that some fields
119 have different naming conventions, or their access requires some casts. */
120
121+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
122+ problem by defining it ourselves. FIXME: Do not rely on glibc
123+ internals. */
124+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
125+# define _IO_IN_BACKUP 0x100
126+#endif
127
128 /* BSD stdio derived implementations. */
129