summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-06 15:57:03 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-08 10:51:59 +0100
commitfd977a604ac498d76c8fefbc27ef55f3259dcd45 (patch)
tree3a7f3052e24342e9988f7184a778c37c87fa9604 /meta/recipes-extended
parent56464dd3963121b79fadd2bdb48c835e4fd4309d (diff)
downloadpoky-fd977a604ac498d76c8fefbc27ef55f3259dcd45.tar.gz
gzip: Fix build with glibc 2.28
(From OE-Core rev: 224500314aa76bf70cbe5dce2c7736e94b9a2ceb) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/gzip/gzip-1.9/gnulib.patch189
-rw-r--r--meta/recipes-extended/gzip/gzip_1.9.bb4
2 files changed, 192 insertions, 1 deletions
diff --git a/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch b/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch
new file mode 100644
index 0000000000..c3cdd72b64
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.9/gnulib.patch
@@ -0,0 +1,189 @@
1From 1831628c0630ae96a43586b2a25ca51cbdba3e53 Mon Sep 17 00:00:00 2001
2From: Paul Eggert <address@hidden>
3Date: Mon, 5 Mar 2018 10:56:29 -0800
4Subject: [PATCH] fflush: adjust to glibc 2.28 libio.h removal
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Problem reported by Daniel P. Berrangé in:
10https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
11* lib/fbufmode.c (fbufmode):
12* lib/fflush.c (clear_ungetc_buffer_preserving_position)
13(disable_seek_optimization, rpl_fflush):
14* lib/fpending.c (__fpending):
15* lib/fpurge.c (fpurge):
16* lib/freadable.c (freadable):
17* lib/freadahead.c (freadahead):
18* lib/freading.c (freading):
19* lib/freadptr.c (freadptr):
20* lib/freadseek.c (freadptrinc):
21* lib/fseeko.c (fseeko):
22* lib/fseterr.c (fseterr):
23* lib/fwritable.c (fwritable):
24* lib/fwriting.c (fwriting):
25Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
26* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
27Define if not already defined.
28---
29
30Upstream-Status: Pending
31Signed-off-by: Khem Raj <raj.khem@gmail.com>
32
33 ChangeLog | 23 +++++++++++++++++++++++
34 lib/fbufmode.c | 2 +-
35 lib/fflush.c | 6 +++---
36 lib/fpending.c | 2 +-
37 lib/fpurge.c | 2 +-
38 lib/freadable.c | 2 +-
39 lib/freadahead.c | 2 +-
40 lib/freading.c | 2 +-
41 lib/freadptr.c | 2 +-
42 lib/freadseek.c | 2 +-
43 lib/fseeko.c | 4 ++--
44 lib/fseterr.c | 2 +-
45 lib/fwritable.c | 2 +-
46 lib/fwriting.c | 2 +-
47 lib/stdio-impl.h | 6 ++++++
48 15 files changed, 45 insertions(+), 16 deletions(-)
49
50Index: gzip-1.9/ChangeLog
51===================================================================
52--- gzip-1.9.orig/ChangeLog
53+++ gzip-1.9/ChangeLog
54@@ -1,3 +1,26 @@
55+2018-03-05 Paul Eggert <address@hidden>
56+
57+ fflush: adjust to glibc 2.28 libio.h removal
58+ Problem reported by Daniel P. Berrangé in:
59+ https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
60+ * lib/fbufmode.c (fbufmode):
61+ * lib/fflush.c (clear_ungetc_buffer_preserving_position)
62+ (disable_seek_optimization, rpl_fflush):
63+ * lib/fpending.c (__fpending):
64+ * lib/fpurge.c (fpurge):
65+ * lib/freadable.c (freadable):
66+ * lib/freadahead.c (freadahead):
67+ * lib/freading.c (freading):
68+ * lib/freadptr.c (freadptr):
69+ * lib/freadseek.c (freadptrinc):
70+ * lib/fseeko.c (fseeko):
71+ * lib/fseterr.c (fseterr):
72+ * lib/fwritable.c (fwritable):
73+ * lib/fwriting.c (fwriting):
74+ Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
75+ * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
76+ Define if not already defined.
77+
78 2018-01-07 Jim Meyering <meyering@fb.com>
79
80 version 1.9
81Index: gzip-1.9/lib/fflush.c
82===================================================================
83--- gzip-1.9.orig/lib/fflush.c
84+++ gzip-1.9/lib/fflush.c
85@@ -33,7 +33,7 @@
86 #undef fflush
87
88
89-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
90+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
91
92 /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
93 static void
94@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
95
96 #endif
97
98-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
99+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
100
101 # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
102 /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
103@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
104 if (stream == NULL || ! freading (stream))
105 return fflush (stream);
106
107-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
108+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
109
110 clear_ungetc_buffer_preserving_position (stream);
111
112Index: gzip-1.9/lib/fpurge.c
113===================================================================
114--- gzip-1.9.orig/lib/fpurge.c
115+++ gzip-1.9/lib/fpurge.c
116@@ -62,7 +62,7 @@ fpurge (FILE *fp)
117 /* Most systems provide FILE as a struct and the necessary bitmask in
118 <stdio.h>, because they need it for implementing getc() and putc() as
119 fast macros. */
120-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
121+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
122 fp->_IO_read_end = fp->_IO_read_ptr;
123 fp->_IO_write_ptr = fp->_IO_write_base;
124 /* Avoid memory leak when there is an active ungetc buffer. */
125Index: gzip-1.9/lib/freading.c
126===================================================================
127--- gzip-1.9.orig/lib/freading.c
128+++ gzip-1.9/lib/freading.c
129@@ -31,7 +31,7 @@ freading (FILE *fp)
130 /* Most systems provide FILE as a struct and the necessary bitmask in
131 <stdio.h>, because they need it for implementing getc() and putc() as
132 fast macros. */
133-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
134+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
135 return ((fp->_flags & _IO_NO_WRITES) != 0
136 || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
137 && fp->_IO_read_base != NULL));
138Index: gzip-1.9/lib/fseeko.c
139===================================================================
140--- gzip-1.9.orig/lib/fseeko.c
141+++ gzip-1.9/lib/fseeko.c
142@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
143 #endif
144
145 /* These tests are based on fpurge.c. */
146-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
147+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
148 if (fp->_IO_read_end == fp->_IO_read_ptr
149 && fp->_IO_write_ptr == fp->_IO_write_base
150 && fp->_IO_save_base == NULL)
151@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when
152 return -1;
153 }
154
155-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
156+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
157 fp->_flags &= ~_IO_EOF_SEEN;
158 fp->_offset = pos;
159 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
160Index: gzip-1.9/lib/fseterr.c
161===================================================================
162--- gzip-1.9.orig/lib/fseterr.c
163+++ gzip-1.9/lib/fseterr.c
164@@ -29,7 +29,7 @@ fseterr (FILE *fp)
165 /* Most systems provide FILE as a struct and the necessary bitmask in
166 <stdio.h>, because they need it for implementing getc() and putc() as
167 fast macros. */
168-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
169+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
170 fp->_flags |= _IO_ERR_SEEN;
171 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
172 /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
173Index: gzip-1.9/lib/stdio-impl.h
174===================================================================
175--- gzip-1.9.orig/lib/stdio-impl.h
176+++ gzip-1.9/lib/stdio-impl.h
177@@ -18,6 +18,12 @@
178 the same implementation of stdio extension API, except that some fields
179 have different naming conventions, or their access requires some casts. */
180
181+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
182+ problem by defining it ourselves. FIXME: Do not rely on glibc
183+ internals. */
184+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
185+# define _IO_IN_BACKUP 0x100
186+#endif
187
188 /* BSD stdio derived implementations. */
189
diff --git a/meta/recipes-extended/gzip/gzip_1.9.bb b/meta/recipes-extended/gzip/gzip_1.9.bb
index a8eeba1380..19f6586526 100644
--- a/meta/recipes-extended/gzip/gzip_1.9.bb
+++ b/meta/recipes-extended/gzip/gzip_1.9.bb
@@ -3,7 +3,9 @@ require gzip.inc
3LICENSE = "GPLv3+" 3LICENSE = "GPLv3+"
4 4
5SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \ 5SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz \
6 file://run-ptest" 6 file://run-ptest \
7 file://gnulib.patch \
8 "
7SRC_URI_append_class-target = " file://wrong-path-fix.patch" 9SRC_URI_append_class-target = " file://wrong-path-fix.patch"
8 10
9LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ 11LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \