summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-29 19:01:56 +0100
committerAlon Levy <alevy@redhat.com>2012-03-04 10:50:38 +0200
commit58b9aa98535586d024033b09a03fca6a1469334e (patch)
tree24e9f222dd6fd5629ba235462b9663ae87cce460 /client
parent4ec9ac20fce858d7fe6769b14b521b62c64c828c (diff)
downloadspice-58b9aa98535586d024033b09a03fca6a1469334e.tar.gz
spice-58b9aa98535586d024033b09a03fca6a1469334e.tar.xz
spice-58b9aa98535586d024033b09a03fca6a1469334e.zip
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.
Diffstat (limited to 'client')
-rw-r--r--client/threads.cpp7
1 files changed, 7 insertions, 0 deletions
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 <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)
{