summaryrefslogtreecommitdiff
path: root/lib/replace/replace.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-24 21:17:56 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-24 22:41:05 +0100
commit49eca290d37ad7564a3be3332ee76020ddb5a03f (patch)
treeb06b54e2a34b9d58842af70612e169cb77a6e153 /lib/replace/replace.c
parentc9fb33697db1bdc1967a0cca557ad323ebe4ea22 (diff)
downloadsamba-49eca290d37ad7564a3be3332ee76020ddb5a03f.tar.gz
samba-49eca290d37ad7564a3be3332ee76020ddb5a03f.tar.bz2
samba-49eca290d37ad7564a3be3332ee76020ddb5a03f.zip
libreplace: Add usleep implementation.
Diffstat (limited to 'lib/replace/replace.c')
-rw-r--r--lib/replace/replace.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 03fae90859..892f56792c 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -890,3 +890,17 @@ int rep_getpeereid(int s, uid_t *uid, gid_t *gid)
#endif
}
#endif
+
+#ifndef HAVE_USLEEP
+int rep_usleep(useconds_t sec)
+{
+ struct timeval tval;
+ /*
+ * Fake it with select...
+ */
+ tval.tv_sec = 0;
+ tval.tv_usec = usecs/1000;
+ select(0,NULL,NULL,NULL,&tval);
+ return 0;
+}
+#endif /* HAVE_USLEEP */