summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wegener <swegener@gentoo.org>2008-06-15 18:52:28 +0000
committerSven Wegener <swegener@gentoo.org>2008-06-15 18:52:28 +0000
commitb40f08eb8a7cfbf71b223b76d450e7d51b1766be (patch)
tree4014b984c20c351a28037141ae5cf526fa4339d2 /app-shells/pdsh/files
parent1.4 version bump. (diff)
downloadgentoo-2-b40f08eb8a7cfbf71b223b76d450e7d51b1766be.tar.gz
gentoo-2-b40f08eb8a7cfbf71b223b76d450e7d51b1766be.tar.bz2
gentoo-2-b40f08eb8a7cfbf71b223b76d450e7d51b1766be.zip
Add compability patches for gcc-4.3 and glibc-2.8.
(Portage version: 2.1.5.5)
Diffstat (limited to 'app-shells/pdsh/files')
-rw-r--r--app-shells/pdsh/files/pdsh-2.14-gcc-4.3-unistd.h.patch13
-rw-r--r--app-shells/pdsh/files/pdsh-2.14-glibc-2.8-ARG_MAX.patch41
2 files changed, 54 insertions, 0 deletions
diff --git a/app-shells/pdsh/files/pdsh-2.14-gcc-4.3-unistd.h.patch b/app-shells/pdsh/files/pdsh-2.14-gcc-4.3-unistd.h.patch
new file mode 100644
index 000000000000..03e568e7290d
--- /dev/null
+++ b/app-shells/pdsh/files/pdsh-2.14-gcc-4.3-unistd.h.patch
@@ -0,0 +1,13 @@
+gcc-4.3 no longer includes this by default, needed to get the ssize_t type.
+
+--- pdsh-2.14/src/modules/machines.c
++++ pdsh-2.14/src/modules/machines.c
+@@ -28,6 +28,8 @@
+ # include "config.h"
+ #endif
+
++#include <unistd.h>
++
+ #include "src/pdsh/wcoll.h"
+ #include "src/pdsh/mod.h"
+ #include "src/common/hostlist.h"
diff --git a/app-shells/pdsh/files/pdsh-2.14-glibc-2.8-ARG_MAX.patch b/app-shells/pdsh/files/pdsh-2.14-glibc-2.8-ARG_MAX.patch
new file mode 100644
index 000000000000..8b0de0ac138c
--- /dev/null
+++ b/app-shells/pdsh/files/pdsh-2.14-glibc-2.8-ARG_MAX.patch
@@ -0,0 +1,41 @@
+glibc-2.8 no longer provides the ARG_MAX macro.
+
+--- pdsh-2.14/src/pdsh/xpopen.c
++++ pdsh-2.14/src/pdsh/xpopen.c
+@@ -84,10 +84,17 @@
+ struct pid *cur;
+ int fds[2], read, fd;
+ pid_t pid;
+- char *av[ARG_MAX + 1];
+ int maxfd = sysconf(_SC_OPEN_MAX);
++ long arg_max;
++ char **av;
++
++ arg_max = sysconf(_SC_ARG_MAX);
++ if (arg_max < 0)
++ errx("%p: unable to get _SC_OPEN_MAX (%m)\n");
++
++ av = Malloc(sizeof(char *) * (arg_max + 1));
+
+- _parse_command_with_quotes(av, ARG_MAX, cmd);
++ _parse_command_with_quotes(av, arg_max, cmd);
+
+ if ((*mode != 'r' && *mode != 'w') || mode[1] != '\0') {
+ errno = EINVAL;
+@@ -101,6 +106,7 @@
+ if (pipe(fds) < 0) {
+ close(fds[0]);
+ close(fds[1]);
++ Free((void **) &av);
+ Free((void **) &cur);
+ errx("%p: unable to dup stdout\n");
+ }
+@@ -143,6 +149,8 @@
+ cur->next = pidlist;
+ pidlist = cur;
+
++ Free((void **) &av);
++
+ return (cur->fp);
+
+ }