OSDN Git Service

graph2dot: Use the fallback getopt implementation if needed
authorMartin Storsjö <martin@martin.st>
Tue, 28 Aug 2012 16:35:39 +0000 (19:35 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 28 Aug 2012 21:24:39 +0000 (00:24 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
tools/graph2dot.c

index 51a1ab1..e7f487d 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "config.h"
+#if HAVE_UNISTD_H
 #include <unistd.h>             /* getopt */
+#endif
 #include <stdio.h>
 #include <string.h>
 
 #include "libavutil/audioconvert.h"
 #include "libavfilter/avfiltergraph.h"
 
+#if !HAVE_GETOPT
+#include "compat/getopt.c"
+#endif
+
 static void usage(void)
 {
     printf("Convert a libavfilter graph to a dot file\n");