summaryrefslogtreecommitdiffstats
path: root/abs/core/iputils/iputils-20070202-no-open-max.patch
blob: 5013ba4fdc06c0cafb8fcc8234248ba9e1c1a147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
the OPEN_MAX define has been removed in newer kernel headers so use the
proper method of getting the value dynamically

http://bugs.gentoo.org/195861

--- a/rdisc.c
+++ b/rdisc.c
@@ -247,7 +247,7 @@ void do_fork(void)
 	if ((pid=fork()) != 0)
 		exit(0);
 
-	for (t = 0; t < OPEN_MAX; t++)
+	for (t = 0; t < sysconf(_SC_OPEN_MAX); t++)
 		if (t != s)
 			close(t);