summaryrefslogtreecommitdiffstats
path: root/main/busybox/busybox-1.18.2-wget.patch
blob: 8c28eea65e3efa209ff269750d5285916a67ef28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- busybox-1.18.2/networking/wget.c
+++ busybox-1.18.2.mod/networking/wget.c
@@ -137,7 +137,7 @@
 		ret = fread(p, 1, nmemb, stream);
 		p += ret;
 		nmemb -= ret;
-	} while (nmemb && ferror(stream) && errno == EINTR);
+	} while (nmemb && ferror(stream) && (errno == EINTR || errno == EAGAIN));
 
 	return p - (char*)ptr;
 }
@@ -152,7 +152,7 @@
 		clearerr(stream);
 		errno = 0;
 		ret = fgets(s, size, stream);
-	} while (ret == NULL && ferror(stream) && errno == EINTR);
+	} while (ret == NULL && ferror(stream) && (errno == EINTR || errno == EAGAIN));
 
 	return ret;
 }