diff options
author | Julian Ospald <hasufell@gentoo.org> | 2014-05-23 17:47:52 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2014-05-23 17:47:52 +0000 |
commit | 81db3855feb52b05ccef57acd249a5c197c5bc92 (patch) | |
tree | 03051649a3ad59807400af79eae358d552a885bd /dev-libs/libuv | |
parent | Mask sci-biology/ncbi-tools++ - removal in 30days (diff) | |
download | gentoo-2-81db3855feb52b05ccef57acd249a5c197c5bc92.tar.gz gentoo-2-81db3855feb52b05ccef57acd249a5c197c5bc92.tar.bz2 gentoo-2-81db3855feb52b05ccef57acd249a5c197c5bc92.zip |
fix tests wrt #510110
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
Diffstat (limited to 'dev-libs/libuv')
-rw-r--r-- | dev-libs/libuv/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/libuv/files/01-libuv-0.11.25-tests.patch | 84 | ||||
-rw-r--r-- | dev-libs/libuv/files/02-libuv-0.11.25-tests.patch | 44 | ||||
-rw-r--r-- | dev-libs/libuv/libuv-0.11.25-r1.ebuild (renamed from dev-libs/libuv/libuv-0.11.25.ebuild) | 4 |
4 files changed, 139 insertions, 2 deletions
diff --git a/dev-libs/libuv/ChangeLog b/dev-libs/libuv/ChangeLog index fec14115213b..fb1c835fbdd7 100644 --- a/dev-libs/libuv/ChangeLog +++ b/dev-libs/libuv/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-libs/libuv # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libuv/ChangeLog,v 1.19 2014/05/10 22:26:20 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libuv/ChangeLog,v 1.20 2014/05/23 17:47:51 hasufell Exp $ + +*libuv-0.11.25-r1 (23 May 2014) + + 23 May 2014; Julian Ospald <hasufell@gentoo.org> -libuv-0.11.25.ebuild, + +libuv-0.11.25-r1.ebuild, +files/01-libuv-0.11.25-tests.patch, + +files/02-libuv-0.11.25-tests.patch: + fix tests wrt #510110 *libuv-0.11.25 (10 May 2014) diff --git a/dev-libs/libuv/files/01-libuv-0.11.25-tests.patch b/dev-libs/libuv/files/01-libuv-0.11.25-tests.patch new file mode 100644 index 000000000000..12eabc213f57 --- /dev/null +++ b/dev-libs/libuv/files/01-libuv-0.11.25-tests.patch @@ -0,0 +1,84 @@ +From f58b02f2cf068e1bed10bf9f632bad396d907de9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= <saghul@gmail.com> +Date: Fri, 23 May 2014 09:25:23 +0200 +Subject: [PATCH] unix, windows: fix parsing scoped IPv6 addresses + +--- + src/inet.c | 37 +++++++++++++++++++++---------------- + 1 file changed, 21 insertions(+), 16 deletions(-) + +diff --git a/src/inet.c b/src/inet.c +index 0eb9438..36457f4 100644 +--- a/src/inet.c ++++ b/src/inet.c +@@ -17,6 +17,7 @@ + + #include <stdio.h> + #include <string.h> ++#include <stdlib.h> + + #if defined(_MSC_VER) && _MSC_VER < 1600 + # include "stdint-msvc2008.h" +@@ -159,11 +160,27 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) { + + + int uv_inet_pton(int af, const char* src, void* dst) { ++ if (src == NULL || dst == NULL) ++ return UV_EINVAL; ++ + switch (af) { + case AF_INET: + return (inet_pton4(src, dst)); +- case AF_INET6: +- return (inet_pton6(src, dst)); ++ case AF_INET6: { ++ int len; ++ char tmp[UV__INET6_ADDRSTRLEN], *s, *p; ++ s = (char*) src; ++ p = strchr(src, '%'); ++ if (p != NULL) { ++ s = tmp; ++ len = p - src; ++ if (len > UV__INET6_ADDRSTRLEN-1) ++ len = UV__INET6_ADDRSTRLEN-1; ++ memcpy(s, src, len); ++ s[len] = '\0'; ++ } ++ return inet_pton6(s, dst); ++ } + default: + return UV_EAFNOSUPPORT; + } +@@ -228,7 +245,7 @@ static int inet_pton6(const char *src, unsigned char *dst) { + curtok = src; + seen_xdigits = 0; + val = 0; +- while ((ch = *src++) != '\0' && ch != '%') { ++ while ((ch = *src++) != '\0') { + const char *pch; + + if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) +@@ -259,19 +276,7 @@ static int inet_pton6(const char *src, unsigned char *dst) { + continue; + } + if (ch == '.' && ((tp + sizeof(struct in_addr)) <= endp)) { +- int err; +- +- /* Scope id present, parse ipv4 addr without it */ +- pch = strchr(curtok, '%'); +- if (pch != NULL) { +- char tmp[sizeof "255.255.255.255"]; +- +- memcpy(tmp, curtok, pch - curtok); +- curtok = tmp; +- src = pch; +- } +- +- err = inet_pton4(curtok, tp); ++ int err = inet_pton4(curtok, tp); + if (err == 0) { + tp += sizeof(struct in_addr); + seen_xdigits = 0; +-- +1.9.3 + diff --git a/dev-libs/libuv/files/02-libuv-0.11.25-tests.patch b/dev-libs/libuv/files/02-libuv-0.11.25-tests.patch new file mode 100644 index 000000000000..d05783c439a2 --- /dev/null +++ b/dev-libs/libuv/files/02-libuv-0.11.25-tests.patch @@ -0,0 +1,44 @@ +From 02c2595fdc259fa15b9a927779cbe65f381f4b26 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= <saghul@gmail.com> +Date: Fri, 23 May 2014 16:36:57 +0200 +Subject: [PATCH] unix, windows: define UV__INET/6_ADDRSTRLEN constants + +--- + src/inet.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/inet.c b/src/inet.c +index 9220de6..0eb9438 100644 +--- a/src/inet.c ++++ b/src/inet.c +@@ -27,6 +27,9 @@ + #include "uv.h" + #include "uv-common.h" + ++#define UV__INET_ADDRSTRLEN 16 ++#define UV__INET6_ADDRSTRLEN 46 ++ + + static int inet_ntop4(const unsigned char *src, char *dst, size_t size); + static int inet_ntop6(const unsigned char *src, char *dst, size_t size); +@@ -49,7 +52,7 @@ int uv_inet_ntop(int af, const void* src, char* dst, size_t size) { + + static int inet_ntop4(const unsigned char *src, char *dst, size_t size) { + static const char fmt[] = "%u.%u.%u.%u"; +- char tmp[sizeof "255.255.255.255"]; ++ char tmp[UV__INET_ADDRSTRLEN]; + int l; + + #ifndef _WIN32 +@@ -74,7 +77,7 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) { + * Keep this in mind if you think this function should have been coded + * to use pointer overlays. All the world's not a VAX. + */ +- char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp; ++ char tmp[UV__INET6_ADDRSTRLEN], *tp; + struct { int base, len; } best, cur; + unsigned int words[sizeof(struct in6_addr) / sizeof(uint16_t)]; + int i; +-- +1.9.3 + diff --git a/dev-libs/libuv/libuv-0.11.25.ebuild b/dev-libs/libuv/libuv-0.11.25-r1.ebuild index 715dd94f363c..2019b215aa29 100644 --- a/dev-libs/libuv/libuv-0.11.25.ebuild +++ b/dev-libs/libuv/libuv-0.11.25-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libuv/libuv-0.11.25.ebuild,v 1.1 2014/05/10 22:26:20 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libuv/libuv-0.11.25-r1.ebuild,v 1.1 2014/05/23 17:47:51 hasufell Exp $ EAPI=5 @@ -21,6 +21,8 @@ src_prepare() { echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ > m4/libuv-extra-automake-flags.m4 || die + epatch "${FILESDIR}"/0{1,2}-${P}-tests.patch + eautoreconf } |