summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/findutils')
-rw-r--r--meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch140
-rw-r--r--meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch78
-rw-r--r--meta/recipes-extended/findutils/findutils_4.6.0.bb2
3 files changed, 220 insertions, 0 deletions
diff --git a/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch
new file mode 100644
index 0000000000..d13e8ed3cf
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-fflush.patch
@@ -0,0 +1,140 @@
1From 80cdfba079627e15129a926a133825b961d41e36 Mon Sep 17 00:00:00 2001
2From: Paul Eggert <eggert@cs.ucla.edu>
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/fflush.c (clear_ungetc_buffer_preserving_position)
12(disable_seek_optimization, rpl_fflush):
13* lib/fpurge.c (fpurge):
14* lib/freadahead.c (freadahead):
15* lib/freading.c (freading):
16* lib/fseeko.c (fseeko):
17* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
18Define if not already defined.
19
20Upstream-commit: 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e
21Signed-off-by: Kamil Dudka <kdudka@redhat.com>
22Upstream-Status: Backport [4af4a4a71827c0bc5e0ec67af23edef4f15cee8e]
23---
24 gl/lib/fflush.c | 6 +++---
25 gl/lib/fpurge.c | 2 +-
26 gl/lib/freadahead.c | 2 +-
27 gl/lib/freading.c | 2 +-
28 gl/lib/fseeko.c | 4 ++--
29 gl/lib/stdio-impl.h | 6 ++++++
30 6 files changed, 14 insertions(+), 8 deletions(-)
31
32Index: findutils-4.6.0/gl/lib/fflush.c
33===================================================================
34--- findutils-4.6.0.orig/gl/lib/fflush.c
35+++ findutils-4.6.0/gl/lib/fflush.c
36@@ -33,7 +33,7 @@
37 #undef fflush
38
39
40-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
41+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
42
43 /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
44 static void
45@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
46
47 #endif
48
49-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
50+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
51
52 # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
53 /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
54@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
55 if (stream == NULL || ! freading (stream))
56 return fflush (stream);
57
58-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
59+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
60
61 clear_ungetc_buffer_preserving_position (stream);
62
63Index: findutils-4.6.0/gl/lib/fpurge.c
64===================================================================
65--- findutils-4.6.0.orig/gl/lib/fpurge.c
66+++ findutils-4.6.0/gl/lib/fpurge.c
67@@ -62,7 +62,7 @@ fpurge (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_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
72+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
73 fp->_IO_read_end = fp->_IO_read_ptr;
74 fp->_IO_write_ptr = fp->_IO_write_base;
75 /* Avoid memory leak when there is an active ungetc buffer. */
76Index: findutils-4.6.0/gl/lib/freadahead.c
77===================================================================
78--- findutils-4.6.0.orig/gl/lib/freadahead.c
79+++ findutils-4.6.0/gl/lib/freadahead.c
80@@ -25,7 +25,7 @@
81 size_t
82 freadahead (FILE *fp)
83 {
84-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
85+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
86 if (fp->_IO_write_ptr > fp->_IO_write_base)
87 return 0;
88 return (fp->_IO_read_end - fp->_IO_read_ptr)
89Index: findutils-4.6.0/gl/lib/freading.c
90===================================================================
91--- findutils-4.6.0.orig/gl/lib/freading.c
92+++ findutils-4.6.0/gl/lib/freading.c
93@@ -31,7 +31,7 @@ freading (FILE *fp)
94 /* Most systems provide FILE as a struct and the necessary bitmask in
95 <stdio.h>, because they need it for implementing getc() and putc() as
96 fast macros. */
97-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
98+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
99 return ((fp->_flags & _IO_NO_WRITES) != 0
100 || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
101 && fp->_IO_read_base != NULL));
102Index: findutils-4.6.0/gl/lib/fseeko.c
103===================================================================
104--- findutils-4.6.0.orig/gl/lib/fseeko.c
105+++ findutils-4.6.0/gl/lib/fseeko.c
106@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
107 #endif
108
109 /* These tests are based on fpurge.c. */
110-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
111+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
112 if (fp->_IO_read_end == fp->_IO_read_ptr
113 && fp->_IO_write_ptr == fp->_IO_write_base
114 && fp->_IO_save_base == NULL)
115@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when
116 return -1;
117 }
118
119-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
120+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
121 fp->_flags &= ~_IO_EOF_SEEN;
122 fp->_offset = pos;
123 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
124Index: findutils-4.6.0/gl/lib/stdio-impl.h
125===================================================================
126--- findutils-4.6.0.orig/gl/lib/stdio-impl.h
127+++ findutils-4.6.0/gl/lib/stdio-impl.h
128@@ -18,6 +18,12 @@
129 the same implementation of stdio extension API, except that some fields
130 have different naming conventions, or their access requires some casts. */
131
132+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
133+ problem by defining it ourselves. FIXME: Do not rely on glibc
134+ internals. */
135+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
136+# define _IO_IN_BACKUP 0x100
137+#endif
138
139 /* BSD stdio derived implementations. */
140
diff --git a/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch
new file mode 100644
index 0000000000..0fb3953cf3
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/findutils-4.6.0-gnulib-makedev.patch
@@ -0,0 +1,78 @@
1From 80628047a6cc83f82e0c410a82b8f7facd9d50f2 Mon Sep 17 00:00:00 2001
2From: Eric Blake <eblake@redhat.com>
3Date: Wed, 14 Sep 2016 19:21:42 -0500
4Subject: [PATCH] mountlist: include sysmacros.h for glibc
5
6On Fedora rawhide (glibc 2.25), './gnulib-tool --test mountlist'
7reports:
8../../gllib/mountlist.c: In function 'read_file_system_list':
9../../gllib/mountlist.c:534:13: warning: '__makedev_from_sys_types' is deprecated:
10 In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
11 For historical compatibility, it is currently defined by
12 <sys/types.h> as well, but we plan to remove this soon.
13 To use `makedev', include <sys/sysmacros.h> directly.
14 If you did not intend to use a system-defined macro `makedev',
15 you should #undef it after including <sys/types.h>.
16 [-Wdeprecated-declarations]
17 me->me_dev = makedev (devmaj, devmin);
18 ^~
19In file included from /usr/include/features.h:397:0,
20 from /usr/include/sys/types.h:25,
21 from ./sys/types.h:28,
22 from ../../gllib/mountlist.h:23,
23 from ../../gllib/mountlist.c:20:
24/usr/include/sys/sysmacros.h:89:1: note: declared here
25 __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_FST_IMPL_TEMPL)
26 ^
27
28Fix it by including the right headers. We also need a fix to
29autoconf's AC_HEADER_MAJOR, but that's a separate patch.
30
31* m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include
32AC_HEADER_MAJOR.
33* lib/mountlist.c (includes): Use correct headers.
34
35Signed-off-by: Eric Blake <eblake@redhat.com>
36
37Upstream-commit: 4da63c5881f60f71999a943612da9112232b9161
38Signed-off-by: Kamil Dudka <kdudka@redhat.com>
39Upstream-Status: Backport [4da63c5881f60f71999a943612da9112232b9161]
40---
41 gl/lib/mountlist.c | 6 ++++++
42 gl/m4/mountlist.m4 | 3 ++-
43 2 files changed, 8 insertions(+), 1 deletion(-)
44
45Index: findutils-4.6.0/gl/lib/mountlist.c
46===================================================================
47--- findutils-4.6.0.orig/gl/lib/mountlist.c
48+++ findutils-4.6.0/gl/lib/mountlist.c
49@@ -37,6 +37,12 @@
50 # include <sys/param.h>
51 #endif
52
53+#if MAJOR_IN_MKDEV
54+# include <sys/mkdev.h>
55+#elif MAJOR_IN_SYSMACROS
56+# include <sys/sysmacros.h>
57+#endif
58+
59 #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */
60 # if HAVE_SYS_UCRED_H
61 # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,
62Index: findutils-4.6.0/gl/m4/mountlist.m4
63===================================================================
64--- findutils-4.6.0.orig/gl/m4/mountlist.m4
65+++ findutils-4.6.0/gl/m4/mountlist.m4
66@@ -1,4 +1,4 @@
67-# serial 11
68+# serial 12
69 dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
70 dnl This file is free software; the Free Software Foundation
71 dnl gives unlimited permission to copy and/or distribute it,
72@@ -15,5 +15,6 @@ AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
73 [
74 dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
75 AC_CHECK_HEADERS([sys/mntent.h])
76+ AC_HEADER_MAJOR()dnl for use of makedev ()
77 gl_FSTYPENAME
78 ])
diff --git a/meta/recipes-extended/findutils/findutils_4.6.0.bb b/meta/recipes-extended/findutils/findutils_4.6.0.bb
index db03252f54..5e4ca94868 100644
--- a/meta/recipes-extended/findutils/findutils_4.6.0.bb
+++ b/meta/recipes-extended/findutils/findutils_4.6.0.bb
@@ -8,6 +8,8 @@ DEPENDS = "bison-native"
8 8
9SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ 9SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
10 file://0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch \ 10 file://0001-find-make-delete-honour-the-ignore_readdir_race-opti.patch \
11 file://findutils-4.6.0-gnulib-fflush.patch \
12 file://findutils-4.6.0-gnulib-makedev.patch \
11" 13"
12 14
13SRC_URI[md5sum] = "9936aa8009438ce185bea2694a997fc1" 15SRC_URI[md5sum] = "9936aa8009438ce185bea2694a997fc1"