aboutsummaryrefslogtreecommitdiffstats
path: root/common/estream.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common/estream.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/estream.c b/common/estream.c
index 00cb749e8..bf5b02001 100644
--- a/common/estream.c
+++ b/common/estream.c
@@ -22,7 +22,7 @@
# include <estream-support.h>
#endif
-#ifdef USE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -597,7 +597,9 @@ es_func_fd_read (void *cookie, char *buffer, size_t size)
estream_cookie_fd_t file_cookie = cookie;
ssize_t bytes_read;
- bytes_read = ESTREAM_SYS_READ (file_cookie->fd, buffer, size);
+ do
+ bytes_read = ESTREAM_SYS_READ (file_cookie->fd, buffer, size);
+ while (bytes_read == -1 && errno == EINTR);
return bytes_read;
}
@@ -610,7 +612,9 @@ es_func_fd_write (void *cookie, const char *buffer, size_t size)
estream_cookie_fd_t file_cookie = cookie;
ssize_t bytes_written;
- bytes_written = ESTREAM_SYS_WRITE (file_cookie->fd, buffer, size);
+ do
+ bytes_written = ESTREAM_SYS_WRITE (file_cookie->fd, buffer, size);
+ while (bytes_written == -1 && errno == EINTR);
return bytes_written;
}