summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-08-10 03:11:04 +0200
committerHaru <haru@dotalux.com>2015-08-10 03:11:04 +0200
commit79891f8dbbe2c9f930f4b162316f8401ff05da02 (patch)
tree167f090c1709ef7ec8e182ee54f51ebd850829fc
parentaa9360cf69c30d26d7333b0c6c952b02b99bcba1 (diff)
downloadhercules-79891f8dbbe2c9f930f4b162316f8401ff05da02.tar.gz
hercules-79891f8dbbe2c9f930f4b162316f8401ff05da02.tar.bz2
hercules-79891f8dbbe2c9f930f4b162316f8401ff05da02.tar.xz
hercules-79891f8dbbe2c9f930f4b162316f8401ff05da02.zip
Fixed a compile error on WIN32/MSVC
- Follow-up to 84e02ac28fbb15c58d0a0f8a916b49663198b05b - Thanks to KirieZ for pointing it out. Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/common/utils.h6
-rw-r--r--src/map/map.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index 0ac818468..e2b0dacc9 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -51,6 +51,12 @@ size_t hread(void * ptr, size_t size, size_t count, FILE * stream);
size_t hwrite(const void * ptr, size_t size, size_t count, FILE * stream);
#endif // HERCULES_CORE
+#ifdef WIN32
+#define HSleep(x) Sleep(1000 * (x))
+#else // ! WIN32
+#define HSleep(x) sleep(x)
+#endif
+
/* [Ind/Hercules] Caching */
struct HCache_interface {
void (*init) (void);
diff --git a/src/map/map.c b/src/map/map.c
index abbc5c954..4da555cd5 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3752,7 +3752,7 @@ int inter_config_read(char *cfgName) {
"Please upgrade to the non-sql version as soon as possible. "
"Bug reports or pull requests concerning the SQL item database are no longer accepted.\n");
ShowInfo("Resuming in 10 seconds...\n");
- sleep(10);
+ HSleep(10);
}
}
else if(strcmpi(w1,"use_sql_mob_db")==0) {
@@ -3764,7 +3764,7 @@ int inter_config_read(char *cfgName) {
"Please upgrade to the non-sql version as soon as possible. "
"Bug reports or pull requests concerning the SQL monster database are no longer accepted.\n");
ShowInfo("Resuming in 10 seconds...\n");
- sleep(10);
+ HSleep(10);
}
}
else if(strcmpi(w1,"use_sql_mob_skill_db")==0) {
@@ -3776,7 +3776,7 @@ int inter_config_read(char *cfgName) {
"Please upgrade to the non-sql version as soon as possible. "
"Bug reports or pull requests concerning the SQL monster skill database are no longer accepted.\n");
ShowInfo("Resuming in 10 seconds...\n");
- sleep(10);
+ HSleep(10);
}
}
else if(strcmpi(w1,"autotrade_merchants_db")==0)