From e7ad573ed894a840e3d844b4dbff5a1f6d1a6b87 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 27 Oct 2010 20:58:51 +0100 Subject: Fix EAGAIN be EINTR. --- dynstr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dynstr.c b/dynstr.c index 47cfad3..44c4b56 100644 --- a/dynstr.c +++ b/dynstr.c @@ -419,7 +419,7 @@ static size_t read_callback(FILE *f, int fd, unsigned char *buf, size_t size) do { n = read(fd, buf, size); - } while (n == -1 && errno == EAGAIN); + } while (n == -1 && errno == EINTR); if (n == -1) return DYNSTR_ERROR; return n; @@ -530,7 +530,7 @@ static int readline_callback(FILE *f, int fd) do { n = read(fd, &c, 1); - } while (n == -1 && errno == EAGAIN); + } while (n == -1 && errno == EINTR); if (n == 0) return -2; else if (n == -1) -- cgit v1.2.1