shithub: sox

Download patch

ref: ab10d9bacdea137e452ca90d8872dbfa8e5f41d2
parent: 0637b77b6db21c3994861e9974b9fc7c7a5b105d
author: cbagwell <cbagwell>
date: Thu May 7 14:31:50 EDT 2009

Minor work around to compile with Fedora's mingw32 cross compiler. Maybe
required for native mingw32 as well.

--- a/src/getopt1.c
+++ b/src/getopt1.c
@@ -24,11 +24,14 @@
 #endif
 #endif
 
+#if 0
 #ifdef _LIBC
 # include <getopt.h>
 #else
 # include "getopt.h"
 #endif
+#endif
+#include "getopt.h"
 
 #if !defined __STDC__ || !__STDC__
 /* This is a separate conditional since some stdc systems
@@ -74,6 +77,10 @@
 #define NULL 0
 #endif
 
+/* Some platforms undef our macro for getopt_long so redo to be safe. */
+#undef getopt_long
+#define getopt_long lsx_getopt_long
+
 int
 getopt_long (
      int argc,
@@ -125,6 +132,7 @@
 #ifdef TEST
 
 #include <stdio.h>
+
 
 int
 main (argc, argv)