mingw: add workaround for _ftime_s issue on mingw

mingw has a _ftime_s prototype in its headers, but no corresponding
symbol available at link time. Workaround this issue for now by
 #defining it to _ftime. This is untested on win64 where the workaround
may not be needed.
This commit is contained in:
Christophe Fergeau 2012-02-29 19:01:56 +01:00 committed by Alon Levy
parent 4ec9ac20fc
commit 58b9aa9853

View File

@ -28,6 +28,13 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef __MINGW32__
//workaround for what I think is a mingw bug: it has a prototype for
//_ftime_s in its headers, but no symbol for it at link time.
//The #define from common.h cannot be used since it breaks other mingw
//headers if any are included after the #define.
#define _ftime_s _ftime
#endif
Thread::Thread(thread_main_t thread_main, void* opaque)
{