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
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')
-rw-r--r--app-shells/pdsh/ChangeLog7
-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
-rw-r--r--app-shells/pdsh/pdsh-2.14.ebuild12
4 files changed, 71 insertions, 2 deletions
diff --git a/app-shells/pdsh/ChangeLog b/app-shells/pdsh/ChangeLog
index 696b01a0a532..d532199fc8ec 100644
--- a/app-shells/pdsh/ChangeLog
+++ b/app-shells/pdsh/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-shells/pdsh
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/pdsh/ChangeLog,v 1.9 2008/03/14 12:18:01 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/pdsh/ChangeLog,v 1.10 2008/06/15 18:52:27 swegener Exp $
+
+ 15 Jun 2008; Sven Wegener <swegener@gentoo.org>
+ +files/pdsh-2.14-gcc-4.3-unistd.h.patch,
+ +files/pdsh-2.14-glibc-2.8-ARG_MAX.patch, pdsh-2.14.ebuild:
+ Add compability patches for gcc-4.3 and glibc-2.8.
14 Mar 2008; Caleb Tennis <caleb@gentoo.org> pdsh-2.14.ebuild:
amd64 stable
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);
+
+ }
diff --git a/app-shells/pdsh/pdsh-2.14.ebuild b/app-shells/pdsh/pdsh-2.14.ebuild
index 9e5aa904e98c..502280d5c338 100644
--- a/app-shells/pdsh/pdsh-2.14.ebuild
+++ b/app-shells/pdsh/pdsh-2.14.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/pdsh/pdsh-2.14.ebuild,v 1.4 2008/03/14 12:18:01 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/pdsh/pdsh-2.14.ebuild,v 1.5 2008/06/15 18:52:27 swegener Exp $
+
+inherit eutils
DESCRIPTION="A high-performance, parallel remote shell utility."
HOMEPAGE="https://computing.llnl.gov/linux/pdsh.html"
@@ -14,6 +16,14 @@ RDEPEND="crypt? ( net-misc/openssh )
readline? ( sys-libs/readline )"
DEPEND="${RDEPEND}"
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-gcc-4.3-unistd.h.patch
+ epatch "${FILESDIR}"/${P}-glibc-2.8-ARG_MAX.patch
+}
+
src_compile() {
econf \
--with-machines \