aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorSlavik Gnatenko <miracle9@newmail.ru>2003-01-11 20:34:38 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-01-11 20:34:38 +0000
commitf3ec2d46bae60984cb9d0a26e94a2cc298b4f06d (patch)
tree3f59e4e94680c16859794b5ead5ce03eb51d0c31 /ffmpeg.c
parent143cc725273c130220e42b7281318ae80083cda3 (diff)
downloadffmpeg-f3ec2d46bae60984cb9d0a26e94a2cc298b4f06d.tar.gz
os2 support patch by ("Slavik Gnatenko" <miracle9 at newmail dot ru>)
Originally committed as revision 1447 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 0459a55ad7..6a8534b1b6 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -28,6 +28,11 @@
#include <termios.h>
#include <sys/resource.h>
#endif
+#ifdef CONFIG_OS2
+#include <sys/types.h>
+#include <sys/select.h>
+#include <stdlib.h>
+#endif
#include <time.h>
#include <ctype.h>
@@ -2497,18 +2502,18 @@ void opt_pass(const char *pass_str)
do_pass = pass;
}
-#ifndef CONFIG_WIN32
+#if defined(CONFIG_WIN32) || defined(CONFIG_OS2)
INT64 getutime(void)
{
- struct rusage rusage;
-
- getrusage(RUSAGE_SELF, &rusage);
- return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
+ return av_gettime();
}
#else
INT64 getutime(void)
{
- return av_gettime();
+ struct rusage rusage;
+
+ getrusage(RUSAGE_SELF, &rusage);
+ return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
}
#endif