patches/uClibc/0.9.30/150-getaddrinfo-segfault-ipv6-and-ipv4.patch
author Cody P Schafer <dev@codyps.com>
Mon May 12 00:02:13 2014 +0200 (2014-05-12)
changeset 3322 eb13867a034c
permissions -rw-r--r--
arch/powerpc: add powerpc64le support

Technically, I don't forbid powerpcle support either, but I'm not sure that
there is any library/compiler support for that at the moment (though the hw
technically makes it possible).

powerpc64le needs glibc 2.19 and gcc 4.9. I haven't looked into the support
tools, but at least gdb 7.5 is too old (7.7.1 definitely has support).

Also make powerpc64 non-experimental. It's practically old at this point.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: use ${target_endian_le} and ${target_bits_64}]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <64bfbbced9dd8f62e0d6.1399801945@gun>
Patchwork-Id: 347775
yann@1217
     1
From: Tomoyoshi ASANO <asa@lineo.co.jp>
yann@1217
     2
Message ID: <20081208073522.0AEF.22C34B8C@lineo.co.jp>
yann@1217
     3
yann@1217
     4
Hello,
yann@1217
     5
yann@1217
     6
I have SEGV at busybox's telnet with uClibc-0.9.30.
yann@1217
     7
It seem the current uClibc-trunk has the same problem.
yann@1217
     8
yann@1217
     9
Thanks,
yann@1217
    10
-- Tom
yann@1217
    11
yann@1217
    12
diff -ru uClibc-0.9.30.orig/libc/inet/getaddrinfo.c uClibc-0.9.30/libc/inet/getaddrinfo.c
yann@1217
    13
--- uClibc-0.9.30.orig/libc/inet/getaddrinfo.c	2008-10-28 17:25:10.000000000 +0100
yann@1217
    14
+++ uClibc-0.9.30/libc/inet/getaddrinfo.c	2009-02-26 14:20:06.000000000 +0100
yann@1217
    15
@@ -186,7 +186,7 @@
yann@1217
    16
 			return seen;
yann@1217
    17
 		}
yann@1217
    18
 
yann@1217
    19
-		for (runp = ifa; runp != NULL; runp = runp->ifa_next)
yann@1217
    20
+		for (runp = ifa; runp != NULL; runp = runp->ifa_next) {
yann@1217
    21
 #if defined __UCLIBC_HAS_IPV4__
yann@1217
    22
 			if (runp->ifa_addr->sa_family == PF_INET)
yann@1217
    23
 				seen |= SEEN_IPV4;
yann@1217
    24
@@ -195,7 +195,7 @@
yann@1217
    25
 			if (runp->ifa_addr->sa_family == PF_INET6)
yann@1217
    26
 				seen |= SEEN_IPV6;
yann@1217
    27
 #endif /* __UCLIBC_HAS_IPV6__ */
yann@1217
    28
-
yann@1217
    29
+                }
yann@1217
    30
 		freeifaddrs(ifa);
yann@1217
    31
 	}
yann@1217
    32
 #else