summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/MSVC
diff options
context:
space:
mode:
authorPete Hurst <pete@streamuniverse.tv>2013-05-15 06:07:01 +0100
committerPete Hurst <pete@streamuniverse.tv>2013-05-19 23:01:04 +0100
commit6484a40017ffa9e33a22607e40e9baa42042543d (patch)
tree8274e6d784d9715e6db761ce585b5113a68416ad /crawl-ref/source/MSVC
parent2a529a547429669cf3b2f984da53a8ed58bb3fcb (diff)
downloadcrawl-ref-6484a40017ffa9e33a22607e40e9baa42042543d.tar.gz
crawl-ref-6484a40017ffa9e33a22607e40e9baa42042543d.zip
Fix missing usleep command in MSVC
Defines it in unistd.h stub instead.
Diffstat (limited to 'crawl-ref/source/MSVC')
-rw-r--r--crawl-ref/source/MSVC/include/unistd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/MSVC/include/unistd.h b/crawl-ref/source/MSVC/include/unistd.h
index 2a27449ede..75f6b59259 100644
--- a/crawl-ref/source/MSVC/include/unistd.h
+++ b/crawl-ref/source/MSVC/include/unistd.h
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <io.h>
#include <getopt.h> /* getopt from: http://www.pwilson.net/sample.html. */
+#include <Windows.h>
#define srandom srand
#define random rand
@@ -25,4 +26,6 @@
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
+#define usleep(n) Sleep(n/1000)
+
#endif /* unistd.h */