summaryrefslogtreecommitdiff
path: root/libavcodec/dct-test.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-07-03 20:14:09 -0700
committerAnton Khirnov <anton@khirnov.net>2012-07-11 21:24:37 +0200
commit667fb97a650dcf9ad50327c7b51f8a95d1e16077 (patch)
tree576d130d4e9ce26c5b99d986ea2ef5473c27033c /libavcodec/dct-test.c
parent183b1c2268529bbb8389d572deb00083c49682dc (diff)
dct/fft-test: use a replacement getopt() if the system has none present.
This allows compiling and running these tests on systems lacking a built- in version of getopt(), such as MSVC. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/dct-test.c')
-rw-r--r--libavcodec/dct-test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 4647642080..ceff448ae7 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -25,10 +25,13 @@
* Started from sample code by Juan J. Sierralta P.
*/
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#if HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <math.h>
#include "libavutil/cpu.h"
@@ -474,6 +477,10 @@ static void help(void)
"-t speed test\n");
}
+#if !HAVE_GETOPT
+#include "compat/getopt.c"
+#endif
+
int main(int argc, char **argv)
{
int test_idct = 0, test_248_dct = 0;