]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/glibc/glibc-rh767693-2.patch
Merge remote-tracking branch 'origin/next' into thirteen
[people/pmueller/ipfire-2.x.git] / src / patches / glibc / glibc-rh767693-2.patch
CommitLineData
12788f63
MT
1Index: glibc-2.5-20061008T1257/sunrpc/svc_tcp.c
2===================================================================
3--- glibc-2.5-20061008T1257.orig/sunrpc/svc_tcp.c
4+++ glibc-2.5-20061008T1257/sunrpc/svc_tcp.c
5@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.
6 #include <sys/poll.h>
7 #include <errno.h>
8 #include <stdlib.h>
9+#include <time.h>
10
11 #ifdef USE_IN_LIBIO
12 # include <wchar.h>
13@@ -249,6 +250,11 @@ again:
14 {
15 if (errno == EINTR)
16 goto again;
17+ if (errno == EMFILE)
18+ {
19+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
20+ __nanosleep(&ts , NULL);
21+ }
22 return FALSE;
23 }
24 /*
25Index: glibc-2.5-20061008T1257/sunrpc/svc_udp.c
26===================================================================
27--- glibc-2.5-20061008T1257.orig/sunrpc/svc_udp.c
28+++ glibc-2.5-20061008T1257/sunrpc/svc_udp.c
29@@ -46,6 +46,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.
30 #include <sys/socket.h>
31 #include <errno.h>
32 #include <libintl.h>
33+#include <time.h>
34
35 #ifdef IP_PKTINFO
36 #include <sys/uio.h>
37@@ -277,8 +278,16 @@ again:
38 (int) su->su_iosz, 0,
39 (struct sockaddr *) &(xprt->xp_raddr), &len);
40 xprt->xp_addrlen = len;
41- if (rlen == -1 && errno == EINTR)
42- goto again;
43+ if (rlen == -1)
44+ {
45+ if (errno == EINTR)
46+ goto again;
47+ if (errno == EMFILE)
48+ {
49+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
50+ __nanosleep(&ts , NULL);
51+ }
52+ }
53 if (rlen < 16) /* < 4 32-bit ints? */
54 return FALSE;
55 xdrs->x_op = XDR_DECODE;
56Index: glibc-2.5-20061008T1257/sunrpc/svc_unix.c
57===================================================================
58--- glibc-2.5-20061008T1257.orig/sunrpc/svc_unix.c
59+++ glibc-2.5-20061008T1257/sunrpc/svc_unix.c
60@@ -48,6 +48,7 @@
61 #include <errno.h>
62 #include <stdlib.h>
63 #include <libintl.h>
64+#include <time.h>
65
66 #ifdef USE_IN_LIBIO
67 # include <wchar.h>
68@@ -247,6 +248,11 @@ again:
69 {
70 if (errno == EINTR)
71 goto again;
72+ if (errno == EMFILE)
73+ {
74+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
75+ __nanosleep(&ts , NULL);
76+ }
77 return FALSE;
78 }
79 /*