shithub: sox

Download patch

ref: 78eab619108fbb344138e02db0cc558cd7a4cc93
parent: be960d187cbab362628859e5663035f21a54c4c7
author: jching <jching>
date: Mon Aug 29 17:43:16 EDT 2005

With visual Studio, some POSIX symbols aren't defined if __STDC__ is
defined.  So check for the platform and defined the required symbols.

--- a/src/sox.c
+++ b/src/sox.c
@@ -49,6 +49,16 @@
 #endif
 #endif
 
+#ifdef _MSC_VER
+/*
+ * __STDC__ is defined, so these symbols aren't created.
+ */
+#define S_IFMT   _S_IFMT
+#define S_IFREG  _S_IFREG
+#define fstat _fstat
+#define strdup _strdup
+#endif
+
 /*
  * SOX main program.
  *