shithub: sox

Download patch

ref: 9923bcf0b70bc292f74b69df85c0ef0bff9a3c31
parent: 4b547a07ff75ccdbc8520552fa4d0097f7f9f0bd
author: Mans Rullgard <mans@mansr.com>
date: Mon Aug 10 14:37:16 EDT 2015

msvc: fix build with Visual Studio 2015 [bug #282]

The FILE type is completely opaque in VS2015, so the rewind_pipe()
hack is not possible.

--- a/src/formats.c
+++ b/src/formats.c
@@ -415,6 +415,8 @@
   fp->_r += PIPE_AUTO_DETECT_SIZE;
 #elif defined __GLIBC__
   fp->_IO_read_ptr = fp->_IO_read_base;
+#elif defined _MSC_VER && _MSC_VER >= 1900
+  #define NO_REWIND_PIPE
 #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || \
       defined _ISO_STDIO_ISO_H || defined __sgi
   fp->_ptr = fp->_base;