OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
1.6 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../findutils/fix-gnulib-freadahead.patch
# Copyright (C) 2015 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- 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
}