summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-10-02 21:43:30 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-10-02 21:43:39 +0200
commit80b8174acb340a36194c1ebe4905ab6cca8fdb8f (patch)
tree05a145e192170c0f6331f536724226b9faf94858
parent9247a35c622bf730449826a1f81226b53c641914 (diff)
downloadmanaserv-80b8174acb340a36194c1ebe4905ab6cca8fdb8f.tar.gz
manaserv-80b8174acb340a36194c1ebe4905ab6cca8fdb8f.tar.bz2
manaserv-80b8174acb340a36194c1ebe4905ab6cca8fdb8f.tar.xz
manaserv-80b8174acb340a36194c1ebe4905ab6cca8fdb8f.zip
UNIX compilation fix for last commit
-rw-r--r--src/game-server/main-game.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp
index ebc92d41..4d2c716c 100644
--- a/src/game-server/main-game.cpp
+++ b/src/game-server/main-game.cpp
@@ -24,6 +24,12 @@
#include <signal.h>
#include <physfs.h>
#include <enet/enet.h>
+#include <unistd.h>
+
+#ifdef __MINGW32__
+#include <windows.h>
+#define usleep(usec) (Sleep ((usec) / 1000), 0)
+#endif
#ifdef HAVE_CONFIG_H
#include "../config.h"
@@ -308,7 +314,7 @@ int main(int argc, char *argv[])
if (!isConnected)
{
LOG_INFO("Retrying in "<<++waittime<<" seconds");
- Sleep(waittime * 1000);
+ usleep(waittime * 1000);
}
}