diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2013-09-04 15:58:51 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2013-09-04 15:58:51 +0200 |
commit | 29df7026088c973b5ba99b48f93b10006e5c0e4c (patch) | |
tree | bb69240c53349e5d4f37ce81036b3404acd2a6c6 /package/m4/patches/patch-lib_freadahead_h | |
parent | 3c20e7545c11200a09e8a37bf1929e1786a59c8b (diff) | |
parent | 3102de1e866e5f716baad9c6ead4162a5b393ceb (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/m4/patches/patch-lib_freadahead_h')
-rw-r--r-- | package/m4/patches/patch-lib_freadahead_h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/m4/patches/patch-lib_freadahead_h b/package/m4/patches/patch-lib_freadahead_h new file mode 100644 index 000000000..fa7a8a1fa --- /dev/null +++ b/package/m4/patches/patch-lib_freadahead_h @@ -0,0 +1,38 @@ +--- m4-1.4.16.orig/lib/freadahead.h 2011-03-01 17:39:27.000000000 +0100 ++++ m4-1.4.16/lib/freadahead.h 2013-09-04 13:59:50.000000000 +0200 +@@ -17,9 +17,6 @@ + #include <stddef.h> + #include <stdio.h> + +-#ifdef __cplusplus +-extern "C" { +-#endif + + /* Assuming the stream STREAM is open for reading: + Return the number of bytes waiting in the input buffer of STREAM. +@@ -31,8 +28,25 @@ extern "C" { + + 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 ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + extern size_t freadahead (FILE *stream); + + #ifdef __cplusplus + } + #endif ++ ++#endif |