From: nu774 Date: Sun, 17 Feb 2013 17:05:07 +0000 (+0900) Subject: fix build issue on i686-pc-mingw (struct __timeb64 is missing) X-Git-Tag: v0.2.0~4 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=bd02d0e753a50e8a134d2e3ebb6aa4ebb715073a;p=fdkaac.git fix build issue on i686-pc-mingw (struct __timeb64 is missing) --- 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; }