summaryrefslogtreecommitdiffstats
path: root/libvncclient/sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncclient/sockets.c')
-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);