summaryrefslogtreecommitdiffstats
path: root/libvncclient
diff options
context:
space:
mode:
authordscho <dscho>2005-12-09 13:56:25 +0000
committerdscho <dscho>2005-12-09 13:56:25 +0000
commit3a8d4bdbe6d264d8f93c75dc62f61ec41e9e7462 (patch)
tree850cf3f85d3247a445f5daa9283840aa4cd507a5 /libvncclient
parent065e2ebb7e4f342a7ceb71216f2e9417cbbdd5f6 (diff)
downloadlibtdevnc-3a8d4bdbe6d264d8f93c75dc62f61ec41e9e7462.tar.gz
libtdevnc-3a8d4bdbe6d264d8f93c75dc62f61ec41e9e7462.zip
work around write() returning ENOENT on Solaris 2.7
Diffstat (limited to 'libvncclient')
-rw-r--r--libvncclient/sockets.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c
index 6ee5a9d..aca38aa 100644
--- a/libvncclient/sockets.c
+++ b/libvncclient/sockets.c
@@ -217,7 +217,11 @@ WriteToRFBServer(rfbClient* client, char *buf, int n)
j = write(client->sock, buf + i, (n - i));
if (j <= 0) {
if (j < 0) {
- if (errno == EWOULDBLOCK || errno == EAGAIN) {
+ if (errno == EWOULDBLOCK ||
+#ifdef LIBVNCSERVER_ENOENT_WORKAROUND
+ errno == ENOENT ||
+#endif
+ errno == EAGAIN) {
FD_ZERO(&fds);
FD_SET(client->sock,&fds);