From a1c913c52f70ee7c70e1e5ae1473ee407cd1494c Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Sat, 17 May 2025 22:12:23 +0200 Subject: [PATCH] Make SoX support uclibc-based toolchains From http://sourceforge.net/p/sox/bugs/179/ Signed-off-by: Gustavo Zacarias [Julien: rebased patch on package git version 7524160, and regenerated with git format-patch] Signed-off-by: Julien Olivain --- src/formats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/formats.c b/src/formats.c index 3fcf4382..9fc001bd 100644 --- a/src/formats.c +++ b/src/formats.c @@ -466,7 +466,7 @@ static void UNUSED rewind_pipe(FILE * fp) #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__ fp->_p -= PIPE_AUTO_DETECT_SIZE; fp->_r += PIPE_AUTO_DETECT_SIZE; -#elif defined __GLIBC__ +#elif defined __GLIBC__ && ! defined __UCLIBC__ fp->_IO_read_ptr = fp->_IO_read_base; #elif defined _MSC_VER && _MSC_VER >= 1900 #define NO_REWIND_PIPE @@ -477,7 +477,6 @@ static void UNUSED rewind_pipe(FILE * fp) /* To fix this #error, either simply remove the #error line and live without * file-type detection with pipes, or add support for your compiler in the * lines above. Test with cat monkey.wav | ./sox --info - */ - #error FIX NEEDED HERE #define NO_REWIND_PIPE (void)fp; #endif -- 2.49.0