summaryrefslogtreecommitdiff
path: root/lib/Handle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Handle.cc')
-rw-r--r--lib/Handle.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc
index 27426ab..013b749 100644
--- a/lib/Handle.cc
+++ b/lib/Handle.cc
@@ -58,7 +58,9 @@ ssize_t Handle::write(const void *buf, size_t count) throw (GeneralException) {
// cerr << "write: throwing IOAgain for handle " << GetName() << endl;
throw IOAgain();
} else {
+#ifdef HAVE_SLEEP
sleep(1);
+#endif
}
}
} else {
@@ -110,10 +112,12 @@ bool Handle::IsNonBlock(void) const {
}
void Handle::SetNonBlock(void) {
+#ifdef HAVE_FCNTL
if ((h >= 0) || !nonblock) {
fcntl(h, F_SETFL, O_NONBLOCK);
}
nonblock = true;
+#endif
}
Handle & operator<<(Handle & h, const String & s) {