projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
930bf74
)
Provide usleep() for Windows.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 13 Nov 2010 14:50:39 +0000
(15:50 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 13 Nov 2010 14:50:39 +0000
(15:50 +0100)
lib/dropin.c
patch
|
blob
|
history
lib/dropin.h
patch
|
blob
|
history
diff --git
a/lib/dropin.c
b/lib/dropin.c
index 89039da34c024b6427d110cfea15ccee3c08acf9..52fb5b8675bd3799eb8177e0df7222f4ecd5edbf 100644
(file)
--- a/
lib/dropin.c
+++ b/
lib/dropin.c
@@
-163,3
+163,10
@@
int gettimeofday(struct timeval *tv, void *tz) {
return 0;
}
#endif
+
+#ifdef HAVE_MINGW
+int usleep(long usec) {
+ Sleep(usec / 1000);
+ return 0;
+}
+#endif
diff --git
a/lib/dropin.h
b/lib/dropin.h
index e9d13535fbfb63f55d92e11dd79d4ef36b49386e..d5cf6d2c104de54cc9c9bf42836209fb69a2f713 100644
(file)
--- a/
lib/dropin.h
+++ b/
lib/dropin.h
@@
-41,4
+41,8
@@
extern int vasprintf(char **, const char *, va_list ap);
extern int gettimeofday(struct timeval *, void *);
#endif
+#ifdef HAVE_MINGW
+extern int usleep(long);
+#endif
+
#endif /* __DROPIN_H__ */