Browse Source

tools/ffeval: include compat/getopt.c in case of missing system getopt()

Stefano Sabatini 12 years ago
parent
commit
22c5cc239c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      tools/ffeval.c

+ 8 - 0
tools/ffeval.c

@@ -18,9 +18,17 @@
  * 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 "libavutil/eval.h"
 
+#if !HAVE_GETOPT
+#include "compat/getopt.c"
+#endif
+
 /**
  * @file
  * simple arithmetic expression evaluator