From 58b9aa98535586d024033b09a03fca6a1469334e Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Wed, 29 Feb 2012 19:01:56 +0100 Subject: 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. --- client/threads.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'client') diff --git a/client/threads.cpp b/client/threads.cpp index bf499e72..e255beed 100644 --- a/client/threads.cpp +++ b/client/threads.cpp @@ -28,6 +28,13 @@ #ifdef HAVE_SYS_TIME_H #include #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) { -- cgit