xref: /OK3568_Linux_fs/buildroot/package/sox/0001-uclibc.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1Make SoX support uclibc-based toolchains, from:
2http://sourceforge.net/p/sox/bugs/179/
3
4Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
5
6Index: sox-14.4.1/src/formats.c
7===================================================================
8--- sox-14.4.1.orig/src/formats.c
9+++ sox-14.4.1/src/formats.c
10@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp
11 #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__
12   fp->_p -= PIPE_AUTO_DETECT_SIZE;
13   fp->_r += PIPE_AUTO_DETECT_SIZE;
14-#elif defined __GLIBC__
15+#elif defined __GLIBC__ && ! defined __UCLIBC__
16   fp->_IO_read_ptr = fp->_IO_read_base;
17 #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H
18   fp->_ptr = fp->_base;
19@@ -417,7 +417,6 @@ static void UNUSED rewind_pipe(FILE * fp
20   /* To fix this #error, either simply remove the #error line and live without
21    * file-type detection with pipes, or add support for your compiler in the
22    * lines above.  Test with cat monkey.wav | ./sox --info - */
23-  #error FIX NEEDED HERE
24   #define NO_REWIND_PIPE
25   (void)fp;
26 #endif
27