aboutsummaryrefslogtreecommitdiffstats
path: root/main/findutils/fix-gnulib-freadahead.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-13 14:27:01 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-13 14:27:53 +0000
commitfc2f04fa15db257eaf6621344afd73d15136d11b (patch)
treeee3a23fbdab7fd426f96a5d75da5ae20ec1d7871 /main/findutils/fix-gnulib-freadahead.patch
parentd97ed5b957c8b67c87242065369a232be6c5ca40 (diff)
downloadaports-fc2f04fa15db257eaf6621344afd73d15136d11b.tar.bz2
aports-fc2f04fa15db257eaf6621344afd73d15136d11b.tar.xz
main/findutils: add missing patch
Diffstat (limited to 'main/findutils/fix-gnulib-freadahead.patch')
-rw-r--r--main/findutils/fix-gnulib-freadahead.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/main/findutils/fix-gnulib-freadahead.patch b/main/findutils/fix-gnulib-freadahead.patch
new file mode 100644
index 0000000000..adcfdd4186
--- /dev/null
+++ b/main/findutils/fix-gnulib-freadahead.patch
@@ -0,0 +1,38 @@
+--- findutils-4.4.2.orig/gnulib/lib/freadahead.c
++++ findutils-4.4.2/gnulib/lib/freadahead.c
+@@ -19,6 +19,7 @@
+ /* Specification. */
+ #include "freadahead.h"
+
++#ifndef HAVE___FREADAHEAD
+ size_t
+ freadahead (FILE *fp)
+ {
+@@ -64,3 +65,4 @@
+ #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread on your system, then report this to bug-gnulib."
+ #endif
+ }
++#endif
+--- findutils-4.4.2.orig/gnulib/lib/freadahead.h
++++ findutils-4.4.2/gnulib/lib/freadahead.h
+@@ -29,7 +29,20 @@
+
+ STREAM must not be wide-character oriented. */
+
++#if HAVE___FREADAHEAD || (defined(__linux__) && !defined(__GLIBC__) && !defined(__UCLIBC__)) /* musl libc */
++
++#ifndef HAVE___FREADAHEAD
++#define HAVE___FREADAHEAD 1
++#endif
++
++# include <stdio_ext.h>
++# define freadahead(stream) __freadahead (stream)
++
++#else
++
+ extern size_t freadahead (FILE *stream);
++
++#endif
+
+ #ifdef __cplusplus
+ }