Fix MSVC build.
authorIlya Zhuravlev <zhuravlevilya@ya.ru>
Sat, 30 Nov 2013 17:00:18 +0000 (21:00 +0400)
committerIlya Zhuravlev <zhuravlevilya@ya.ru>
Sat, 30 Nov 2013 17:00:18 +0000 (21:00 +0400)
src/jthread/win32/jthread.cpp
src/script/lua_api/l_async_events.h

index e56c1627109edc553ff0093e3c4cd07b203c1457..fc1464064f35dcb27f502992bc3c0b80defcc9d3 100644 (file)
@@ -77,7 +77,7 @@ int JThread::Start()
                runningmutex.Unlock();
                return ERR_JTHREAD_ALREADYRUNNING;
        }
-       requeststop = false;e
+       requeststop = false;
        runningmutex.Unlock();
 
        continuemutex.Lock();
index 079a08009b7a7da61f5c71348d0a48b981021c24..3364bac6e7b816d239fdaecd151c6a6e9054afcc 100644 (file)
@@ -22,7 +22,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include <vector>
 #include <map>
+
+#ifndef _MSC_VER
 #include <unistd.h>
+#else
+#define _WINSOCKAPI_
+#include <windows.h>
+static unsigned sleep(unsigned seconds) {
+       Sleep(seconds * 1000);
+       return 0;
+}
+#endif
 
 /******************************************************************************/
 /* Includes                                                                   */