Commit c822d44f authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

findutils must be patched for new glibc

parent 56fb2354
all: all:
tar xf findutils-4.6.0.tar.gz tar xf findutils-4.6.0.tar.gz
cd findutils-4.6.0 && sed -i 's/test-lock..EXEEXT.//' tests/Makefile.in patch -Np1 -d findutils-4.6.0 < findutils-4.6.0-glibc_fix.patch
cd findutils-4.6.0 && ./configure --build=$(CLFS_TARGET) --prefix=/usr --localstatedir=/var/lib/locate cd findutils-4.6.0 && ./configure --build=$(CLFS_TARGET) --prefix=/usr --localstatedir=/var/lib/locate
$(MAKE) -C findutils-4.6.0 $(MAKE) -C findutils-4.6.0
if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \ if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<exec executable="tar" failonerror="true"> <exec executable="tar" failonerror="true">
<arg line="xf packages/findutils/findutils-4.6.0.tar.gz -C ${builddir}"/> <arg line="xf packages/findutils/findutils-4.6.0.tar.gz -C ${builddir}"/>
</exec> </exec>
<exec executable="patch" dir="${builddir}/findutils-4.6.0" failonerror="true">
<arg line="-Np1 -i ${basedir}/packages/findutils/findutils-4.6.0-glibc_fix.patch"/>
</exec>
<exec executable="./configure" dir="${makedir}" failonerror="true"> <exec executable="./configure" dir="${makedir}" failonerror="true">
<env key="PATH" path="${PATH}"/> <env key="PATH" path="${PATH}"/>
<env key="CC" value="${CLFS_TARGET}-gcc"/> <env key="CC" value="${CLFS_TARGET}-gcc"/>
......
diff -uNr findutils-4.6.0/gl/lib/fflush.c findutils-4.6.0-glibc_fix/gl/lib/fflush.c
--- findutils-4.6.0/gl/lib/fflush.c 2015-12-25 03:11:42.000000000 +1030
+++ findutils-4.6.0-glibc_fix/gl/lib/fflush.c 2019-09-02 01:00:16.246442287 +0930
@@ -33,7 +33,7 @@
#undef fflush
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
static void
@@ -72,7 +72,7 @@
#endif
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
@@ -148,7 +148,7 @@
if (stream == NULL || ! freading (stream))
return fflush (stream);
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
clear_ungetc_buffer_preserving_position (stream);
diff -uNr findutils-4.6.0/gl/lib/fpurge.c findutils-4.6.0-glibc_fix/gl/lib/fpurge.c
--- findutils-4.6.0/gl/lib/fpurge.c 2015-12-25 03:11:42.000000000 +1030
+++ findutils-4.6.0-glibc_fix/gl/lib/fpurge.c 2019-09-02 01:00:16.315442431 +0930
@@ -62,7 +62,7 @@
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_IO_read_end = fp->_IO_read_ptr;
fp->_IO_write_ptr = fp->_IO_write_base;
/* Avoid memory leak when there is an active ungetc buffer. */
diff -uNr findutils-4.6.0/gl/lib/freadahead.c findutils-4.6.0-glibc_fix/gl/lib/freadahead.c
--- findutils-4.6.0/gl/lib/freadahead.c 2015-12-25 03:11:42.000000000 +1030
+++ findutils-4.6.0-glibc_fix/gl/lib/freadahead.c 2019-09-02 01:00:16.315442431 +0930
@@ -25,7 +25,7 @@
size_t
freadahead (FILE *fp)
{
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_write_ptr > fp->_IO_write_base)
return 0;
return (fp->_IO_read_end - fp->_IO_read_ptr)
diff -uNr findutils-4.6.0/gl/lib/freading.c findutils-4.6.0-glibc_fix/gl/lib/freading.c
--- findutils-4.6.0/gl/lib/freading.c 2015-12-25 03:11:42.000000000 +1030
+++ findutils-4.6.0-glibc_fix/gl/lib/freading.c 2019-09-02 01:00:16.315442431 +0930
@@ -31,7 +31,7 @@
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
diff -uNr findutils-4.6.0/gl/lib/fseeko.c findutils-4.6.0-glibc_fix/gl/lib/fseeko.c
--- findutils-4.6.0/gl/lib/fseeko.c 2015-12-25 03:11:42.000000000 +1030
+++ findutils-4.6.0-glibc_fix/gl/lib/fseeko.c 2019-09-02 01:00:16.316442433 +0930
@@ -47,7 +47,7 @@
#endif
/* These tests are based on fpurge.c. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
@@ -123,7 +123,7 @@
return -1;
}
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
fp->_offset = pos;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
diff -uNr findutils-4.6.0/gl/lib/mountlist.c findutils-4.6.0-glibc_fix/gl/lib/mountlist.c
--- findutils-4.6.0/gl/lib/mountlist.c 2015-12-25 03:11:44.000000000 +1030
+++ findutils-4.6.0-glibc_fix/gl/lib/mountlist.c 2019-09-02 01:00:26.236463030 +0930
@@ -32,6 +32,7 @@
#include <fcntl.h>
#include <unistd.h>
+#include <sys/sysmacros.h>
#if HAVE_SYS_PARAM_H
# include <sys/param.h>
diff -uNr findutils-4.6.0/gl/lib/stdio-impl.h findutils-4.6.0-glibc_fix/gl/lib/stdio-impl.h
--- findutils-4.6.0/gl/lib/stdio-impl.h 2015-12-25 03:11:45.000000000 +1030
+++ findutils-4.6.0-glibc_fix/gl/lib/stdio-impl.h 2019-09-02 01:00:37.439486293 +0930
@@ -111,3 +111,4 @@
# endif
#endif
+#define _IO_IN_BACKUP 0x100
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment