From bd02d0e753a50e8a134d2e3ebb6aa4ebb715073a Mon Sep 17 00:00:00 2001 From: nu774 Date: Mon, 18 Feb 2013 02:05:07 +0900 Subject: [PATCH] fix build issue on i686-pc-mingw (struct __timeb64 is missing) --- configure.ac | 1 + src/compat_win32.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 9d0ef2e..fa9d587 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AC_TYPE_UINT8_T AC_CHECK_TYPES([ptrdiff_t]) AC_SYS_LARGEFILE +AC_CHECK_TYPES([struct __timeb64],[],[],[[#include ]]) AC_FUNC_FSEEKO AC_CHECK_FUNCS([sigaction gettimeofday nl_langinfo strdup _vscprintf]) AC_CHECK_FUNC(getopt_long) diff --git a/src/compat_win32.c b/src/compat_win32.c index d65ea50..684998e 100644 --- a/src/compat_win32.c +++ b/src/compat_win32.c @@ -31,8 +31,13 @@ int __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, _startupinfo *); int64_t aacenc_timer(void) { +#if _MSC_VER || HAVE_STRUCT___TIMEB64 struct __timeb64 tv; _ftime64(&tv); +#else + struct timeb tv; + ftime(&tv); +#endif return (int64_t)tv.time * 1000 + tv.millitm; } -- 2.39.2