SOURCES: iputils-OPEN_MAX.patch (NEW) - allow build with new llh (...
tommat
tommat at pld-linux.org
Tue Nov 27 21:19:05 CET 2007
Author: tommat Date: Tue Nov 27 20:19:05 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- allow build with new llh (from FC)
---- Files affected:
SOURCES:
iputils-OPEN_MAX.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/iputils-OPEN_MAX.patch
diff -u /dev/null SOURCES/iputils-OPEN_MAX.patch:1.1
--- /dev/null Tue Nov 27 21:19:05 2007
+++ SOURCES/iputils-OPEN_MAX.patch Tue Nov 27 21:18:59 2007
@@ -0,0 +1,28 @@
+--- iputils-s20070202/rdisc.c.open-max 2007-08-07 11:34:03.000000000 +0200
++++ iputils-s20070202/rdisc.c 2007-08-07 11:41:30.000000000 +0200
+@@ -240,14 +240,25 @@
+ {
+ int t;
+ pid_t pid;
++ long open_max;
+
+ if (trace)
+ return;
+
++ if ((open_max = sysconf(_SC_OPEN_MAX)) == -1) {
++ if (errno == 0) {
++ (void) fprintf(stderr, "OPEN_MAX is not supported\n");
++ }
++ else {
++ (void) fprintf(stderr, "sysconf() error\n");
++ }
++ exit(1);
++ }
++
+ if ((pid=fork()) != 0)
+ exit(0);
+
+- for (t = 0; t < OPEN_MAX; t++)
++ for (t = 0; t < open_max; t++)
+ if (t != s)
+ close(t);
================================================================
More information about the pld-cvs-commit
mailing list