diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-08-09 14:42:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-08-09 14:42:19 +0000 |
commit | 732d6ab01864624c5e4f77360d805b6bb72a3c99 (patch) | |
tree | fcfe472540d0549ecc6fb369318463c7cfb9c871 /dev-libs | |
parent | Added sed to emerge system and alias sed=gsed to profile.bashrc (diff) | |
download | gentoo-2-732d6ab01864624c5e4f77360d805b6bb72a3c99.tar.gz gentoo-2-732d6ab01864624c5e4f77360d805b6bb72a3c99.tar.bz2 gentoo-2-732d6ab01864624c5e4f77360d805b6bb72a3c99.zip |
fix `emerge sync` segfault
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/uclibc/ChangeLog | 7 | ||||
-rw-r--r-- | dev-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch | 47 | ||||
-rw-r--r-- | dev-libs/uclibc/uclibc-0.9.26-r5.ebuild | 5 |
3 files changed, 57 insertions, 2 deletions
diff --git a/dev-libs/uclibc/ChangeLog b/dev-libs/uclibc/ChangeLog index 87c5614f15d2..f934263949bd 100644 --- a/dev-libs/uclibc/ChangeLog +++ b/dev-libs/uclibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-libs/uclibc # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.31 2004/08/09 04:41:17 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.32 2004/08/09 14:42:19 vapier Exp $ + + 09 Aug 2004; Mike Frysinger <vapier@gentoo.org> + +files/0.9.26/uclibc-0.9.26-resolve-segfault.patch, uclibc-0.9.26-r5.ebuild: + Add a homebrewed patch to fix the bug with gethostname() which didnt setup the + h_aliases data. *uclibc-0.9.26-r5 (09 Aug 2004) diff --git a/dev-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch b/dev-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch new file mode 100644 index 000000000000..2b9b1ab1dc66 --- /dev/null +++ b/dev-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch @@ -0,0 +1,47 @@ +--- libc/inet/resolv.c.orig 2004-08-09 14:04:58 +0000 ++++ libc/inet/resolv.c 2004-08-09 14:07:09 +0000 +@@ -1846,6 +1846,7 @@ + { + struct in_addr *in; + struct in_addr **addr_list; ++ char **alias; + unsigned char *packet; + struct resolv_answer a; + int i; +@@ -1899,17 +1900,27 @@ + + addr_list[0] = in; + addr_list[1] = 0; +- ++ ++ if (buflen < sizeof(char *)*(ALIAS_DIM)) ++ return ERANGE; ++ alias=(char **)buf; ++ buf+=sizeof(char **)*(ALIAS_DIM); ++ buflen-=sizeof(char **)*(ALIAS_DIM); ++ + if (buflen<256) + return ERANGE; + strncpy(buf, name, buflen); + ++ alias[0] = buf; ++ alias[1] = NULL; ++ + /* First check if this is already an address */ + if (inet_aton(name, in)) { + result_buf->h_name = buf; + result_buf->h_addrtype = AF_INET; + result_buf->h_length = sizeof(*in); + result_buf->h_addr_list = (char **) addr_list; ++ result_buf->h_aliases = alias; + *result=result_buf; + *h_errnop = NETDB_SUCCESS; + return NETDB_SUCCESS; +@@ -1954,6 +1965,7 @@ + result_buf->h_addrtype = AF_INET; + result_buf->h_length = sizeof(*in); + result_buf->h_addr_list = (char **) addr_list; ++ result_buf->h_aliases = alias; /* TODO: generate the full list */ + free(packet); + break; + } else { diff --git a/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild b/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild index 9bb0b5798992..79c86023206b 100644 --- a/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild +++ b/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild,v 1.1 2004/08/09 04:41:17 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r5.ebuild,v 1.2 2004/08/09 14:42:19 vapier Exp $ inherit eutils flag-o-matic gcc @@ -84,6 +84,9 @@ src_unpack() { epatch ${FILESDIR}/${PV}/${PN}-${PV}-noexecstack.patch fi + # fix segfaults when running things like `emerge sync` + epatch ${FILESDIR}/${PV}/${PN}-${PV}-resolve-segfault.patch + # fixup for install perms sed -i -e "s:-fa:-dRf:g" Makefile |