summaryrefslogtreecommitdiff
path: root/net-misc
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2007-10-04 17:16:59 +0200
committerBertrand Jacquin <beber@meleeweb.net>2007-10-04 17:16:59 +0200
commit77daba6454612ec200f14a6331a056d07e3915a2 (patch)
treede4f89cf48ebbc192fd9d61af079fb499721def6 /net-misc
parentNew meleeweb-utils releases (diff)
downloadportage-77daba6454612ec200f14a6331a056d07e3915a2.tar.xz
meleeweb release of iputils (minimal version)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/iputils/Manifest68
-rw-r--r--net-misc/iputils/files/021109-ipg-linux-2.6.patch45
-rw-r--r--net-misc/iputils/files/021109-no-pfkey-search.patch8
-rw-r--r--net-misc/iputils/files/021109-syserror.patch9
-rw-r--r--net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch24
-rw-r--r--net-misc/iputils/files/digest-iputils-200605123
-rw-r--r--net-misc/iputils/files/iputils-021109-bindnow.patch16
-rw-r--r--net-misc/iputils/files/iputils-021109-gcc34.patch134
-rw-r--r--net-misc/iputils/files/iputils-021109-gcc4.patch177
-rw-r--r--net-misc/iputils/files/iputils-021109-ipv6-updates.patch93
-rw-r--r--net-misc/iputils/files/iputils-021109-linux-udp-header.patch15
-rw-r--r--net-misc/iputils/files/iputils-20060512-RFC3542.patch25
-rw-r--r--net-misc/iputils/files/iputils-20060512-gcc4.patch168
-rw-r--r--net-misc/iputils/files/iputils-20060512-kernel-ifaddr.patch85
-rw-r--r--net-misc/iputils/files/iputils-20060512-linux-headers.patch10
-rw-r--r--net-misc/iputils/files/iputils-20060512-makefile.patch36
-rw-r--r--net-misc/iputils/files/iputils-20070202-makefile.patch35
-rw-r--r--net-misc/iputils/iputils-20060512.ebuild81
18 files changed, 1032 insertions, 0 deletions
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
new file mode 100644
index 00000000..fdcabe3a
--- /dev/null
+++ b/net-misc/iputils/Manifest
@@ -0,0 +1,68 @@
+AUX 021109-ipg-linux-2.6.patch 981 RMD160 a89a5b0365dbc21abaa7dded4597158f34a06e4c SHA1 3840d311e39c8d901fc9796db52f2e8d1a11c0d7 SHA256 8794d4046aa73b7bbc5083d8d3204cce0d0ee32b00647e758427d6ba0e9628ab
+MD5 c9986b4299c200260da8f025c5e4b0ea files/021109-ipg-linux-2.6.patch 981
+RMD160 a89a5b0365dbc21abaa7dded4597158f34a06e4c files/021109-ipg-linux-2.6.patch 981
+SHA256 8794d4046aa73b7bbc5083d8d3204cce0d0ee32b00647e758427d6ba0e9628ab files/021109-ipg-linux-2.6.patch 981
+AUX 021109-no-pfkey-search.patch 307 RMD160 acb6af71e67f874ceb5278006e24d45ef2a55a03 SHA1 ab2943f56cfd7db78b0988b6667112e8a8540869 SHA256 ce4f073534b5091ab928698257bdf8dbaaaa53b9b6aa40bd1c77eff3cfd980f2
+MD5 c11c8762616b29e6d556a147aaa9374a files/021109-no-pfkey-search.patch 307
+RMD160 acb6af71e67f874ceb5278006e24d45ef2a55a03 files/021109-no-pfkey-search.patch 307
+SHA256 ce4f073534b5091ab928698257bdf8dbaaaa53b9b6aa40bd1c77eff3cfd980f2 files/021109-no-pfkey-search.patch 307
+AUX 021109-syserror.patch 324 RMD160 461a890ce1bcdae2725c56b1a34b98efc8b79d37 SHA1 81d3626212f87cbb108759b406f2c1d522a23d90 SHA256 b630f3a62e0577acd43dc7aae48a839198e7838918d1e4e71ff9c36fd206e592
+MD5 d85216426f34d4e768ab8f9f48c66e4f files/021109-syserror.patch 324
+RMD160 461a890ce1bcdae2725c56b1a34b98efc8b79d37 files/021109-syserror.patch 324
+SHA256 b630f3a62e0577acd43dc7aae48a839198e7838918d1e4e71ff9c36fd206e592 files/021109-syserror.patch 324
+AUX 021109-uclibc-no-ether_ntohost.patch 635 RMD160 234010cd5aadc5086beb638c19514659974939f8 SHA1 8e7fda98a1cc1fae5b8f75f9aec200fcb3afee49 SHA256 cf8135fd380918890a1da8de438d5283111f1e9ea0754b4f5c78bb703fcf617b
+MD5 b4615612d4514f12b35fbaf27d3e04fe files/021109-uclibc-no-ether_ntohost.patch 635
+RMD160 234010cd5aadc5086beb638c19514659974939f8 files/021109-uclibc-no-ether_ntohost.patch 635
+SHA256 cf8135fd380918890a1da8de438d5283111f1e9ea0754b4f5c78bb703fcf617b files/021109-uclibc-no-ether_ntohost.patch 635
+AUX iputils-021109-bindnow.patch 511 RMD160 aefefcdde73444cec6ab51fdbb36886600368b8b SHA1 e9970fd8b930b719e4219e1fe73f6b27fcfb9ea6 SHA256 16c744ad23c16b90746eee08f36579ff0db996adcc01c908d2386381c564570d
+MD5 e5bfab718c4dbfe351c8220e20b6052d files/iputils-021109-bindnow.patch 511
+RMD160 aefefcdde73444cec6ab51fdbb36886600368b8b files/iputils-021109-bindnow.patch 511
+SHA256 16c744ad23c16b90746eee08f36579ff0db996adcc01c908d2386381c564570d files/iputils-021109-bindnow.patch 511
+AUX iputils-021109-gcc34.patch 2313 RMD160 354dcdc651bcfb88bd96d9008367854e91a5f7f7 SHA1 97baa39948144d83f0d484d2c5df0c8efc924590 SHA256 f015536e6b043aacdc7e55afd2394ecdea4d1aeeb33780e3857374788321bf9e
+MD5 744f2999dcf0fc5fd25ffcfeedd574d9 files/iputils-021109-gcc34.patch 2313
+RMD160 354dcdc651bcfb88bd96d9008367854e91a5f7f7 files/iputils-021109-gcc34.patch 2313
+SHA256 f015536e6b043aacdc7e55afd2394ecdea4d1aeeb33780e3857374788321bf9e files/iputils-021109-gcc34.patch 2313
+AUX iputils-021109-gcc4.patch 4071 RMD160 c433ebf099e09320a60b7d1aeb7eb4127ce9697f SHA1 8654e31146cbd688d20e6795b44280f36baf6cb3 SHA256 f6d270b69a41b296d92b9c191a03f46379dc75270e92cb392b6f67ecfaf8069f
+MD5 02ad61a6cb57f69f04b50434a49b3017 files/iputils-021109-gcc4.patch 4071
+RMD160 c433ebf099e09320a60b7d1aeb7eb4127ce9697f files/iputils-021109-gcc4.patch 4071
+SHA256 f6d270b69a41b296d92b9c191a03f46379dc75270e92cb392b6f67ecfaf8069f files/iputils-021109-gcc4.patch 4071
+AUX iputils-021109-ipv6-updates.patch 2715 RMD160 df547f3a8c3c34704f4a0237e2f4d31c85ec4eaf SHA1 1b6c899b1a85335ff31f778a460408fece1142d9 SHA256 9c7b5539938d918e17a98e0abd58c36b78fc5dfdec6791c0205144660c2804ac
+MD5 bae7115e31b2ed7abe4546d8ee54de67 files/iputils-021109-ipv6-updates.patch 2715
+RMD160 df547f3a8c3c34704f4a0237e2f4d31c85ec4eaf files/iputils-021109-ipv6-updates.patch 2715
+SHA256 9c7b5539938d918e17a98e0abd58c36b78fc5dfdec6791c0205144660c2804ac files/iputils-021109-ipv6-updates.patch 2715
+AUX iputils-021109-linux-udp-header.patch 418 RMD160 fc11364990492f813061116252bdab361e43092e SHA1 85ec6af23a1dfacf773772a4645c341ab7fe5b64 SHA256 0a206f5b0848b73609ff8be30411510431a6b8ec91a6fbed4e7c84788a2584f9
+MD5 79de65b9da536090d0560ba51520fd9d files/iputils-021109-linux-udp-header.patch 418
+RMD160 fc11364990492f813061116252bdab361e43092e files/iputils-021109-linux-udp-header.patch 418
+SHA256 0a206f5b0848b73609ff8be30411510431a6b8ec91a6fbed4e7c84788a2584f9 files/iputils-021109-linux-udp-header.patch 418
+AUX iputils-20060512-RFC3542.patch 572 RMD160 1008d7bf14ffea9f0187c316bb9f3d5b9dcf2258 SHA1 f1a785adf73168b429494878c2db0e47f4a6e2ee SHA256 7f9320f02b22acb73fbf98a2044c34ef481c95264ad337caee38b5599b7deba5
+MD5 ab6d91dfd2a300f556fc6285958b21d1 files/iputils-20060512-RFC3542.patch 572
+RMD160 1008d7bf14ffea9f0187c316bb9f3d5b9dcf2258 files/iputils-20060512-RFC3542.patch 572
+SHA256 7f9320f02b22acb73fbf98a2044c34ef481c95264ad337caee38b5599b7deba5 files/iputils-20060512-RFC3542.patch 572
+AUX iputils-20060512-gcc4.patch 3842 RMD160 8047c466e3d452c3819d6c4ad06a73f54c394175 SHA1 b330a19ecbc85de40d847e925cf85de4c3c452b6 SHA256 f27bc75d71a8e62c5156672479da21ae95ad9c482583b29c857e2b85c9c9764b
+MD5 e48a6543f70991a919dd752b48b4165f files/iputils-20060512-gcc4.patch 3842
+RMD160 8047c466e3d452c3819d6c4ad06a73f54c394175 files/iputils-20060512-gcc4.patch 3842
+SHA256 f27bc75d71a8e62c5156672479da21ae95ad9c482583b29c857e2b85c9c9764b files/iputils-20060512-gcc4.patch 3842
+AUX iputils-20060512-kernel-ifaddr.patch 1732 RMD160 88d0f57dc248e67fd7a7c6ca5705a721c553a177 SHA1 6e2617524eb6167476bd51461f43b24e619fcc1a SHA256 6b6d1e80ecb2a1bf8b5887c653abd6403e5edd743638d60eb07bc491b91bd7fe
+MD5 63918c30a1f249c6b2ebf49ac3162c8b files/iputils-20060512-kernel-ifaddr.patch 1732
+RMD160 88d0f57dc248e67fd7a7c6ca5705a721c553a177 files/iputils-20060512-kernel-ifaddr.patch 1732
+SHA256 6b6d1e80ecb2a1bf8b5887c653abd6403e5edd743638d60eb07bc491b91bd7fe files/iputils-20060512-kernel-ifaddr.patch 1732
+AUX iputils-20060512-linux-headers.patch 213 RMD160 55c51196e4604e1810ab85faa5dfd195b0fddbf1 SHA1 8ff0acaf2ec425f860b6476dee71d2a07d9d4525 SHA256 b715bb3db742310727a87582d2c8eb79983160772c3fc8221d49efd3ed133c4f
+MD5 123e85c31544297f1b4331555bcb9b5d files/iputils-20060512-linux-headers.patch 213
+RMD160 55c51196e4604e1810ab85faa5dfd195b0fddbf1 files/iputils-20060512-linux-headers.patch 213
+SHA256 b715bb3db742310727a87582d2c8eb79983160772c3fc8221d49efd3ed133c4f files/iputils-20060512-linux-headers.patch 213
+AUX iputils-20060512-makefile.patch 1011 RMD160 703f761f21f03d5b0ba970b16436ce7128f6311c SHA1 5e952870bf4f1c2996d7ded8566f32668c2726a9 SHA256 339cc4826a9352db5829e94c8fd1d1306424a1b34b3612d9936fb2b0ea943ee1
+MD5 4e95a30129623fe2c1b651f00c2413d0 files/iputils-20060512-makefile.patch 1011
+RMD160 703f761f21f03d5b0ba970b16436ce7128f6311c files/iputils-20060512-makefile.patch 1011
+SHA256 339cc4826a9352db5829e94c8fd1d1306424a1b34b3612d9936fb2b0ea943ee1 files/iputils-20060512-makefile.patch 1011
+AUX iputils-20070202-makefile.patch 982 RMD160 1b245b116eb9ede2698e7a37122cd1e6fb4c4dfd SHA1 aef3be153f43179c09289028ad945669bd19a0f5 SHA256 10da0ffbbf0d3df72f0a7218cd94a2668eff318e12f402ae3279fec090462b4a
+MD5 4dd8c06c9c06338359f7efe5b1791288 files/iputils-20070202-makefile.patch 982
+RMD160 1b245b116eb9ede2698e7a37122cd1e6fb4c4dfd files/iputils-20070202-makefile.patch 982
+SHA256 10da0ffbbf0d3df72f0a7218cd94a2668eff318e12f402ae3279fec090462b4a files/iputils-20070202-makefile.patch 982
+DIST iputils-s20060512.tar.bz2 88091 RMD160 7fedbf48a0899e81f9e9d8b4902c0ab3d7b66db7 SHA1 daa7fd4efb9ac0c8800c46325faf487298025412 SHA256 61d5adff80ebe0530c8f4b9933cc8e08d8528012f8a96a788e638b411f369e8e
+EBUILD iputils-20060512.ebuild 2097 RMD160 a5e64c3f68a33879b982e9380a1901a9b70da9a7 SHA1 2bd46acdf2eb41b7d43fbf72f4d22b51faea198c SHA256 18d89a09db0323f44d720c700384439e17189f45def6dc0f422b1737af1d231b
+MD5 74030c63b54025aadc230480bef936fa iputils-20060512.ebuild 2097
+RMD160 a5e64c3f68a33879b982e9380a1901a9b70da9a7 iputils-20060512.ebuild 2097
+SHA256 18d89a09db0323f44d720c700384439e17189f45def6dc0f422b1737af1d231b iputils-20060512.ebuild 2097
+MD5 d1a03b4e8b248518bfbdb595e328f009 files/digest-iputils-20060512 253
+RMD160 3af2bac60b9609d76247499078f8beb978cedea4 files/digest-iputils-20060512 253
+SHA256 cc03114cb4292c3e01b341a32fe72f00b3f736f2af9cd00c6ed6480510dcee35 files/digest-iputils-20060512 253
diff --git a/net-misc/iputils/files/021109-ipg-linux-2.6.patch b/net-misc/iputils/files/021109-ipg-linux-2.6.patch
new file mode 100644
index 00000000..550a8d58
--- /dev/null
+++ b/net-misc/iputils/files/021109-ipg-linux-2.6.patch
@@ -0,0 +1,45 @@
+In newer kernels, the pg file has moved around in /proc/.
+
+http://bugs.gentoo.org/show_bug.cgi?id=71756
+
+--- iputils/ipg.orig 2005-01-03 22:47:26.314393976 -0500
++++ iputils/ipg 2005-01-03 22:49:09.686679000 -0500
+@@ -1,21 +1,31 @@
+-#! /bin/bash
++#!/bin/bash
+
+-modprobe pg3
++modprobe pg3 >& /dev/null
++modprobe pktgen >& /dev/null
++
++PGDEV=/proc/net/pg
++if [[ ! -e ${PGDEV} ]] ; then
++ PGDEV=/proc/net/pktgen/pg0
++ if [[ ! -e ${PGDEV} ]] ; then
++ echo "Couldn't not locate pg in /proc/net :("
++ exit 1
++ fi
++fi
+
+ function pgset() {
+ local result
+
+- echo $1 > /proc/net/pg
++ echo $1 > ${PGDEV}
+
+- result=`cat /proc/net/pg | fgrep "Result: OK:"`
++ result=`cat ${PGDEV} | fgrep "Result: OK:"`
+ if [ "$result" = "" ]; then
+- cat /proc/net/pg | fgrep Result:
++ cat ${PGDEV} | fgrep Result:
+ fi
+ }
+
+ function pg() {
+- echo inject > /proc/net/pg
+- cat /proc/net/pg
++ echo inject > ${PGDEV}
++ cat ${PGDEV}
+ }
+
+ pgset "odev eth0"
diff --git a/net-misc/iputils/files/021109-no-pfkey-search.patch b/net-misc/iputils/files/021109-no-pfkey-search.patch
new file mode 100644
index 00000000..836040cc
--- /dev/null
+++ b/net-misc/iputils/files/021109-no-pfkey-search.patch
@@ -0,0 +1,8 @@
+--- Makefile.orig 2004-04-07 02:07:14.361973576 -0400
++++ Makefile 2004-04-07 02:07:21.243927360 -0400
+@@ -20,5 +19,0 @@
+-ifeq ($(KERNEL_INCLUDE)/linux/pfkeyv2.h,$(wildcard $(KERNEL_INCLUDE)/linux/pfkeyv2.h))
+- SUBDIRS=libipsec setkey
+- LDLIBS+=-Llibipsec -lipsec
+- IPSECDEF=-DDO_IPSEC -Ilibipsec
+-endif
diff --git a/net-misc/iputils/files/021109-syserror.patch b/net-misc/iputils/files/021109-syserror.patch
new file mode 100644
index 00000000..a4f94f40
--- /dev/null
+++ b/net-misc/iputils/files/021109-syserror.patch
@@ -0,0 +1,9 @@
+--- iputils/rdisc.c.orig 2005-01-03 22:53:27.852431840 -0500
++++ iputils/rdisc.c 2005-01-03 22:53:27.864430016 -0500
+@@ -1504,5 +1504,5 @@
+ if (logging)
+ syslog(LOG_ERR, "%s: %m", str);
+ else
+- (void) fprintf(stderr, "%s: %s\n", str, sys_errlist[errno]);
++ (void) fprintf(stderr, "%s: %s\n", str, strerror(errno));
+ }
diff --git a/net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch b/net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch
new file mode 100644
index 00000000..e790d2b5
--- /dev/null
+++ b/net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch
@@ -0,0 +1,24 @@
+--- iputils/rarpd.c.mps 2004-06-10 15:27:01.000000000 +0200
++++ iputils/rarpd.c 2004-06-10 15:26:29.000000000 +0200
+@@ -42,7 +42,9 @@ int listen_arp;
+ char *ifname;
+ char *tftp_dir = "/etc/tftpboot";
+
++#ifndef __UCLIBC__
+ extern int ether_ntohost(char *name, unsigned char *ea);
++#endif
+ void usage(void) __attribute__((noreturn));
+
+ struct iflink
+@@ -305,7 +307,11 @@ struct rarp_map *rarp_lookup(int ifindex
+ 6,
+ };
+
++#ifndef __UCLIBC__
+ if (ether_ntohost(ename, lladdr) != 0 ||
++#else
++ if (
++#endif
+ (hp = gethostbyname(ename)) == NULL) {
+ if (verbose)
+ syslog(LOG_INFO, "not found in /etc/ethers");
diff --git a/net-misc/iputils/files/digest-iputils-20060512 b/net-misc/iputils/files/digest-iputils-20060512
new file mode 100644
index 00000000..8b513147
--- /dev/null
+++ b/net-misc/iputils/files/digest-iputils-20060512
@@ -0,0 +1,3 @@
+MD5 ec00560576a068fb95fe0bf1a298e2d5 iputils-s20060512.tar.bz2 88091
+RMD160 7fedbf48a0899e81f9e9d8b4902c0ab3d7b66db7 iputils-s20060512.tar.bz2 88091
+SHA256 61d5adff80ebe0530c8f4b9933cc8e08d8528012f8a96a788e638b411f369e8e iputils-s20060512.tar.bz2 88091
diff --git a/net-misc/iputils/files/iputils-021109-bindnow.patch b/net-misc/iputils/files/iputils-021109-bindnow.patch
new file mode 100644
index 00000000..469418b2
--- /dev/null
+++ b/net-misc/iputils/files/iputils-021109-bindnow.patch
@@ -0,0 +1,16 @@
+Since these binaries are going to be setuid root, we want
+don't want to allow lazy bindings, otherwise we allow some
+information leakage.
+
+http://bugs.gentoo.org/77526
+
+--- Makefile
++++ Makefile
+@@ -39,3 +39,7 @@
+ ping: ping.o ping_common.o
++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro
+ ping6: ping6.o ping_common.o
++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro
++traceroute6: traceroute6.o
++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro
+ ping.o ping6.o ping_common.o: ping_common.h
diff --git a/net-misc/iputils/files/iputils-021109-gcc34.patch b/net-misc/iputils/files/iputils-021109-gcc34.patch
new file mode 100644
index 00000000..98e1c6eb
--- /dev/null
+++ b/net-misc/iputils/files/iputils-021109-gcc34.patch
@@ -0,0 +1,134 @@
+iputils has a lot of ugly goto's that break when using
+large gcc inline-limits.
+
+Fixes by Robert Moss and Dave Stahl
+http://bugs.gentoo.org/49241
+http://bugs.gentoo.org/80969
+
+--- iputils/tracepath.c
++++ iputils/tracepath.c
+@@ -76,7 +76,7 @@
+ int progress = -1;
+ int broken_router;
+
+-restart:
++ while (1) {
+ memset(&rcvbuf, -1, sizeof(rcvbuf));
+ iov.iov_base = &rcvbuf;
+ iov.iov_len = sizeof(rcvbuf);
+@@ -93,7 +93,7 @@
+ if (res < 0) {
+ if (errno == EAGAIN)
+ return progress;
+- goto restart;
++ continue;
+ }
+
+ progress = mtu;
+@@ -216,7 +216,7 @@
+ perror("NET ERROR");
+ return 0;
+ }
+- goto restart;
++ }
+ }
+
+ int probe_ttl(int fd, int ttl)
+@@ -227,7 +227,6 @@
+
+ memset(sndbuf,0,mtu);
+
+-restart:
+ for (i=0; i<10; i++) {
+ int res;
+
+@@ -243,7 +242,8 @@
+ if (res==0)
+ return 0;
+ if (res > 0)
+- goto restart;
++ i = 0;
++ continue;
+ }
+ hisptr = (hisptr + 1)&63;
+
+--- iputils/tracepath6.c
++++ iputils/tracepath6.c
+@@ -66,7 +66,7 @@
+ int progress = -1;
+ int broken_router;
+
+-restart:
++ while (1) {
+ memset(&rcvbuf, -1, sizeof(rcvbuf));
+ iov.iov_base = &rcvbuf;
+ iov.iov_len = sizeof(rcvbuf);
+@@ -83,7 +83,7 @@
+ if (res < 0) {
+ if (errno == EAGAIN)
+ return progress;
+- goto restart;
++ continue;
+ }
+
+ progress = 2;
+@@ -222,34 +222,29 @@
+ perror("NET ERROR");
+ return 0;
+ }
+- goto restart;
++ }
+ }
+
+ int probe_ttl(int fd, int ttl)
+ {
+- int i;
++ int i=0, res;
+ char sndbuf[mtu];
+ struct probehdr *hdr = (struct probehdr*)sndbuf;
+
+-restart:
+-
+- for (i=0; i<10; i++) {
+- int res;
+-
+- hdr->ttl = ttl;
+- gettimeofday(&hdr->tv, NULL);
+- if (send(fd, sndbuf, mtu-overhead, 0) > 0)
+- break;
+- res = recverr(fd, ttl);
+- if (res==0)
+- return 0;
+- if (res > 0)
+- goto restart;
+- }
+-
+- if (i<10) {
+- int res;
+-
++ while (i<10) {
++ for (i=0; i<10; i++) {
++ hdr->ttl = ttl;
++ gettimeofday(&hdr->tv, NULL);
++ if (send(fd, sndbuf, mtu-overhead, 0) > 0)
++ break;
++ res = recverr(fd, ttl);
++ if (res==0)
++ return 0;
++ if (res > 0) {
++ i = 0;
++ continue;
++ }
++ }
+ data_wait(fd);
+ if (recv(fd, sndbuf, sizeof(sndbuf), MSG_DONTWAIT) > 0) {
+ printf("%2d?: reply received 8)\n", ttl);
+@@ -257,7 +252,7 @@
+ }
+ res = recverr(fd, ttl);
+ if (res == 1)
+- goto restart;
++ continue;
+ return res;
+ }
+
diff --git a/net-misc/iputils/files/iputils-021109-gcc4.patch b/net-misc/iputils/files/iputils-021109-gcc4.patch
new file mode 100644
index 00000000..2ed079e0
--- /dev/null
+++ b/net-misc/iputils/files/iputils-021109-gcc4.patch
@@ -0,0 +1,177 @@
+fix a lot of incorrect types
+
+--- iputils/arping.c
++++ iputils/arping.c
+@@ -434,7 +434,7 @@ main(int argc, char **argv)
+ }
+ } else if (!dad) {
+ int on = 1;
+- int alen = sizeof(saddr);
++ socklen_t alen = sizeof(saddr);
+
+ saddr.sin_port = htons(1025);
+ saddr.sin_addr = dst;
+@@ -463,7 +463,7 @@ main(int argc, char **argv)
+ }
+
+ if (1) {
+- int alen = sizeof(me);
++ socklen_t alen = sizeof(me);
+ if (getsockname(s, (struct sockaddr*)&me, &alen) == -1) {
+ perror("getsockname");
+ exit(2);
+@@ -495,9 +495,9 @@ main(int argc, char **argv)
+
+ while(1) {
+ sigset_t sset, osset;
+- char packet[4096];
++ unsigned char packet[4096];
+ struct sockaddr_ll from;
+- int alen = sizeof(from);
++ socklen_t alen = sizeof(from);
+ int cc;
+
+ if ((cc = recvfrom(s, packet, sizeof(packet), 0,
+--- iputils/clockdiff.c
++++ iputils/clockdiff.c
+@@ -120,7 +120,7 @@ long rtt_sigma = 0;
+ int
+ measure(struct sockaddr_in * addr)
+ {
+- int length;
++ socklen_t length;
+ int msgcount;
+ int cc, count;
+ fd_set ready;
+@@ -299,7 +299,7 @@ char *myname, *hisname;
+ int
+ measure_opt(struct sockaddr_in * addr)
+ {
+- int length;
++ socklen_t length;
+ int msgcount;
+ int cc, count;
+ fd_set ready;
+@@ -597,7 +597,7 @@ main(int argc, char *argv[])
+ }
+ if (ip_opt_len) {
+ struct sockaddr_in myaddr;
+- int addrlen = sizeof(myaddr);
++ socklen_t addrlen = sizeof(myaddr);
+ unsigned char rspace[ip_opt_len];
+
+ bzero(rspace, sizeof(rspace));
+--- iputils/ping6.c
++++ iputils/ping6.c
+@@ -313,7 +313,7 @@ int main(int argc, char *argv[])
+ hostname = target;
+
+ if (ipv6_addr_any(&source.sin6_addr)) {
+- int alen;
++ socklen_t alen;
+ int probe_fd = socket(AF_INET6, SOCK_DGRAM, 0);
+
+ if (probe_fd < 0) {
+--- iputils/ping.c
++++ iputils/ping.c
+@@ -260,7 +260,7 @@ main(int argc, char **argv)
+ }
+
+ if (source.sin_addr.s_addr == 0) {
+- int alen;
++ socklen_t alen;
+ struct sockaddr_in dst = whereto;
+ int probe_fd = socket(AF_INET, SOCK_DGRAM, 0);
+
+--- iputils/ping_common.c
++++ iputils/ping_common.c
+@@ -67,7 +67,7 @@ static void fill(char *patp)
+ int ii, jj, kk;
+ int pat[16];
+ char *cp;
+- char *bp = outpack+8;
++ u_char *bp = outpack+8;
+
+ for (cp = patp; *cp; cp++) {
+ if (!isxdigit(*cp)) {
+@@ -393,7 +393,7 @@ resend:
+ void sock_setbufs(int icmp_sock, int alloc)
+ {
+ int rcvbuf, hold;
+- int tmplen = sizeof(hold);
++ socklen_t tmplen = sizeof(hold);
+
+ if (!sndbuf)
+ sndbuf = alloc;
+@@ -464,7 +464,7 @@ void setup(int icmp_sock)
+
+ if (!(options & F_PINGFILLED)) {
+ int i;
+- char *p = outpack+8;
++ u_char *p = outpack+8;
+
+ /* Do not forget about case of small datalen,
+ * fill timestamp area too!
+--- iputils/rarpd.c
++++ iputils/rarpd.c
+@@ -423,7 +423,7 @@ void serve_it(int fd)
+ {
+ unsigned char buf[1024];
+ struct sockaddr_ll sll;
+- int sll_len = sizeof(sll);
++ socklen_t sll_len = sizeof(sll);
+ struct arphdr *a = (struct arphdr*)buf;
+ struct rarp_map *rmap;
+ unsigned char *ptr;
+--- iputils/rdisc.c
++++ iputils/rdisc.c
+@@ -451,7 +451,7 @@ next:
+ for (;;) {
+ u_char packet[MAXPACKET];
+ int len = sizeof (packet);
+- int fromlen = sizeof (from);
++ socklen_t fromlen = sizeof (from);
+ int cc;
+
+ cc=recvfrom(s, (char *)packet, len, 0,
+--- iputils/tftpd.c
++++ iputils/tftpd.c
+@@ -89,7 +89,7 @@ union {
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ } from;
+-int fromlen;
++socklen_t fromlen;
+
+ #define MAXARG 1
+ char *dirs[MAXARG+1];
+@@ -149,7 +149,8 @@ int main(int ac, char **av)
+ */
+ {
+ int pid;
+- int i, j;
++ int i;
++ socklen_t j;
+
+ for (i = 1; i < 20; i++) {
+ pid = fork();
+--- iputils/traceroute6.c
++++ iputils/traceroute6.c
+@@ -501,7 +501,7 @@ int main(int argc, char *argv[])
+ (char *)&on, sizeof(on));
+
+ if (source == NULL) {
+- int alen;
++ socklen_t alen;
+ int probe_fd = socket(AF_INET6, SOCK_DGRAM, 0);
+
+ if (probe_fd < 0) {
+@@ -622,7 +622,7 @@ wait_for_reply(sock, from, reset_timer)
+ fd_set fds;
+ static struct timeval wait;
+ int cc = 0;
+- int fromlen = sizeof (*from);
++ socklen_t fromlen = sizeof (*from);
+
+ FD_ZERO(&fds);
+ FD_SET(sock, &fds);
diff --git a/net-misc/iputils/files/iputils-021109-ipv6-updates.patch b/net-misc/iputils/files/iputils-021109-ipv6-updates.patch
new file mode 100644
index 00000000..6e0acc8f
--- /dev/null
+++ b/net-misc/iputils/files/iputils-021109-ipv6-updates.patch
@@ -0,0 +1,93 @@
+Handle ipv6 define changes
+
+http://bugs.gentoo.org/134751
+
+--- iputils/ping_common.h
++++ iputils/ping_common.h
+@@ -37,6 +37,17 @@
+ #define CLR(bit) (A(bit) &= (~B(bit)))
+ #define TST(bit) (A(bit) & B(bit))
+
++/* handle updates to IPV6 defines */
++#ifndef IPV6_2292PKTINFO
++# define IPV6_2292PKTINFO IPV6_PKTINFO
++#endif
++#ifndef IPV6_2292RTHDR
++# define IPV6_2292RTHDR IPV6_RTHDR
++#endif
++#ifndef IPV6_2292HOPLIMIT
++# define IPV6_2292HOPLIMIT IPV6_HOPLIMIT
++#endif
++
+ /* various options */
+ extern int options;
+ #define F_FLOOD 0x001
+--- iputils/ping6.c
++++ iputils/ping6.c
+@@ -153,7 +153,7 @@ extern struct cmsghdr * inet6_srcrt_init
+
+ cmsg->cmsg_len = sizeof(struct cmsghdr) + sizeof(struct rt0_hdr);
+ cmsg->cmsg_level = SOL_IPV6;
+- cmsg->cmsg_type = IPV6_RTHDR;
++ cmsg->cmsg_type = IPV6_2292RTHDR;
+
+ return cmsg;
+ }
+@@ -372,7 +372,7 @@ int main(int argc, char *argv[])
+ cmsglen += CMSG_SPACE(sizeof(*ipi));
+ cmsg->cmsg_len = CMSG_LEN(sizeof(*ipi));
+ cmsg->cmsg_level = SOL_IPV6;
+- cmsg->cmsg_type = IPV6_PKTINFO;
++ cmsg->cmsg_type = IPV6_2292PKTINFO;
+
+ ipi = (struct in6_pktinfo*)CMSG_DATA(cmsg);
+ memset(ipi, 0, sizeof(*ipi));
+@@ -483,7 +483,7 @@ int main(int argc, char *argv[])
+
+ if (1) {
+ int on = 1;
+- if (setsockopt(icmp_sock, IPPROTO_IPV6, IPV6_HOPLIMIT,
++ if (setsockopt(icmp_sock, IPPROTO_IPV6, IPV6_2292HOPLIMIT,
+ &on, sizeof(on)) == -1) {
+ perror ("can't receive hop limit");
+ exit(2);
+@@ -701,7 +701,7 @@ parse_reply(struct msghdr *msg, int cc,
+
+ for (c = CMSG_FIRSTHDR(msg); c; c = CMSG_NXTHDR(msg, c)) {
+ if (c->cmsg_level != SOL_IPV6 ||
+- c->cmsg_type != IPV6_HOPLIMIT)
++ c->cmsg_type != IPV6_2292HOPLIMIT)
+ continue;
+ if (c->cmsg_len < CMSG_LEN(sizeof(int)))
+ continue;
+--- iputils/tracepath6.c
++++ iputils/tracepath6.c
+@@ -25,6 +25,8 @@
+ #include <sys/uio.h>
+ #include <arpa/inet.h>
+
++#include "ping_common.h"
++
+ int overhead = 48;
+ int mtu = 128000;
+ int hops_to = -1;
+@@ -111,7 +111,7 @@ int recverr(int fd, int ttl)
+ if (cmsg->cmsg_level == SOL_IPV6) {
+ if (cmsg->cmsg_type == IPV6_RECVERR) {
+ e = (struct sock_extended_err *)CMSG_DATA(cmsg);
+- } else if (cmsg->cmsg_type == IPV6_HOPLIMIT) {
++ } else if (cmsg->cmsg_type == IPV6_2292HOPLIMIT) {
+ rethops = *(int*)CMSG_DATA(cmsg);
+ }
+ } else if (cmsg->cmsg_level == SOL_IP) {
+@@ -349,8 +349,8 @@ int main(int argc, char **argv)
+ perror("IP_RECVERR");
+ exit(1);
+ }
+- if (setsockopt(fd, SOL_IPV6, IPV6_HOPLIMIT, &on, sizeof(on))) {
+- perror("IPV6_HOPLIMIT");
++ if (setsockopt(fd, SOL_IPV6, IPV6_2292HOPLIMIT, &on, sizeof(on))) {
++ perror("IPV6_2292HOPLIMIT");
+ exit(1);
+ }
+ if (mapped && setsockopt(fd, SOL_IP, IP_RECVTTL, &on, sizeof(on))) {
diff --git a/net-misc/iputils/files/iputils-021109-linux-udp-header.patch b/net-misc/iputils/files/iputils-021109-linux-udp-header.patch
new file mode 100644
index 00000000..b60a2353
--- /dev/null
+++ b/net-misc/iputils/files/iputils-021109-linux-udp-header.patch
@@ -0,0 +1,15 @@
+diff -Nru iputils.old/traceroute6.c iputils/traceroute6.c
+--- iputils.old/traceroute6.c 2004-09-29 21:10:48.540700488 -0400
++++ iputils/traceroute6.c 2004-09-29 21:11:58.667039664 -0400
+@@ -244,7 +244,11 @@
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/ip_icmp.h>
++#if __linux__
++#include <linux/udp.h>
++#else
+ #include <netinet/udp.h>
++#endif
+
+ #include <linux/ipv6.h>
+ #include <linux/in6.h>
diff --git a/net-misc/iputils/files/iputils-20060512-RFC3542.patch b/net-misc/iputils/files/iputils-20060512-RFC3542.patch
new file mode 100644
index 00000000..8aad86d7
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20060512-RFC3542.patch
@@ -0,0 +1,25 @@
+taken from upstream git repo
+
+--- ping6.c
++++ ping6.c
+@@ -80,6 +80,11 @@
+ #define SOL_ICMPV6 IPPROTO_ICMPV6
+ #endif
+
++/* RFC3542 */
++#ifndef ICMP6_DST_UNREACH_BEYONDSCOPE
++#define ICMP6_DST_UNREACH_BEYONDSCOPE ICMP6_DST_UNREACH_NOTNEIGHBOR
++#endif
++
+ #ifndef IPV6_SRCRT_TYPE_0
+ #define IPV6_SRCRT_TYPE_0 0
+ #endif
+@@ -829,7 +834,7 @@
+ case ICMP6_DST_UNREACH_ADMIN:
+ printf("Administratively prohibited");
+ break;
+- case ICMP6_DST_UNREACH_NOTNEIGHBOR:
++ case ICMP6_DST_UNREACH_BEYONDSCOPE:
+ printf("Not neighbour");
+ break;
+ case ICMP6_DST_UNREACH_ADDR:
diff --git a/net-misc/iputils/files/iputils-20060512-gcc4.patch b/net-misc/iputils/files/iputils-20060512-gcc4.patch
new file mode 100644
index 00000000..aab44f8f
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20060512-gcc4.patch
@@ -0,0 +1,168 @@
+fix a lot of incorrect types
+
+--- iputils/arping.c
++++ iputils/arping.c
+@@ -434,7 +434,7 @@ main(int argc, char **argv)
+ }
+ } else if (!dad) {
+ int on = 1;
+- int alen = sizeof(saddr);
++ socklen_t alen = sizeof(saddr);
+
+ saddr.sin_port = htons(1025);
+ saddr.sin_addr = dst;
+@@ -463,7 +463,7 @@ main(int argc, char **argv)
+ }
+
+ if (1) {
+- int alen = sizeof(me);
++ socklen_t alen = sizeof(me);
+ if (getsockname(s, (struct sockaddr*)&me, &alen) == -1) {
+ perror("getsockname");
+ exit(2);
+@@ -495,9 +495,9 @@ main(int argc, char **argv)
+
+ while(1) {
+ sigset_t sset, osset;
+- char packet[4096];
++ unsigned char packet[4096];
+ struct sockaddr_ll from;
+- int alen = sizeof(from);
++ socklen_t alen = sizeof(from);
+ int cc;
+
+ if ((cc = recvfrom(s, packet, sizeof(packet), 0,
+--- iputils/clockdiff.c
++++ iputils/clockdiff.c
+@@ -120,7 +120,7 @@ long rtt_sigma = 0;
+ int
+ measure(struct sockaddr_in * addr)
+ {
+- int length;
++ socklen_t length;
+ int msgcount;
+ int cc, count;
+ fd_set ready;
+@@ -299,7 +299,7 @@ char *myname, *hisname;
+ int
+ measure_opt(struct sockaddr_in * addr)
+ {
+- int length;
++ socklen_t length;
+ int msgcount;
+ int cc, count;
+ fd_set ready;
+@@ -597,7 +597,7 @@ main(int argc, char *argv[])
+ }
+ if (ip_opt_len) {
+ struct sockaddr_in myaddr;
+- int addrlen = sizeof(myaddr);
++ socklen_t addrlen = sizeof(myaddr);
+ unsigned char rspace[ip_opt_len];
+
+ bzero(rspace, sizeof(rspace));
+--- iputils/ping6.c
++++ iputils/ping6.c
+@@ -313,7 +313,7 @@ int main(int argc, char *argv[])
+ hostname = target;
+
+ if (ipv6_addr_any(&source.sin6_addr)) {
+- int alen;
++ socklen_t alen;
+ int probe_fd = socket(AF_INET6, SOCK_DGRAM, 0);
+
+ if (probe_fd < 0) {
+--- iputils/ping.c
++++ iputils/ping.c
+@@ -260,7 +260,7 @@ main(int argc, char **argv)
+ }
+
+ if (source.sin_addr.s_addr == 0) {
+- int alen;
++ socklen_t alen;
+ struct sockaddr_in dst = whereto;
+ int probe_fd = socket(AF_INET, SOCK_DGRAM, 0);
+
+--- iputils/ping_common.c
++++ iputils/ping_common.c
+@@ -67,7 +67,7 @@ static void fill(char *patp)
+ int ii, jj, kk;
+ int pat[16];
+ char *cp;
+- char *bp = outpack+8;
++ u_char *bp = outpack+8;
+
+ for (cp = patp; *cp; cp++) {
+ if (!isxdigit(*cp)) {
+@@ -393,7 +393,7 @@ resend:
+ void sock_setbufs(int icmp_sock, int alloc)
+ {
+ int rcvbuf, hold;
+- int tmplen = sizeof(hold);
++ socklen_t tmplen = sizeof(hold);
+
+ if (!sndbuf)
+ sndbuf = alloc;
+@@ -464,7 +464,7 @@ void setup(int icmp_sock)
+
+ if (!(options & F_PINGFILLED)) {
+ int i;
+- char *p = outpack+8;
++ u_char *p = outpack+8;
+
+ /* Do not forget about case of small datalen,
+ * fill timestamp area too!
+--- iputils/rarpd.c
++++ iputils/rarpd.c
+@@ -423,7 +423,7 @@ void serve_it(int fd)
+ {
+ unsigned char buf[1024];
+ struct sockaddr_ll sll;
+- int sll_len = sizeof(sll);
++ socklen_t sll_len = sizeof(sll);
+ struct arphdr *a = (struct arphdr*)buf;
+ struct rarp_map *rmap;
+ unsigned char *ptr;
+--- iputils/rdisc.c
++++ iputils/rdisc.c
+@@ -451,7 +451,7 @@ next:
+ for (;;) {
+ u_char packet[MAXPACKET];
+ int len = sizeof (packet);
+- int fromlen = sizeof (from);
++ socklen_t fromlen = sizeof (from);
+ int cc;
+
+ cc=recvfrom(s, (char *)packet, len, 0,
+--- iputils/tftpd.c
++++ iputils/tftpd.c
+@@ -89,7 +89,7 @@ union {
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ } from;
+-int fromlen;
++socklen_t fromlen;
+
+ #define MAXARG 1
+ char *dirs[MAXARG+1];
+@@ -149,7 +149,8 @@ int main(int ac, char **av)
+ */
+ {
+ int pid;
+- int i, j;
++ int i;
++ socklen_t j;
+
+ for (i = 1; i < 20; i++) {
+ pid = fork();
+--- iputils/traceroute6.c
++++ iputils/traceroute6.c
+@@ -501,7 +501,7 @@ int main(int argc, char *argv[])
+ (char *)&on, sizeof(on));
+
+ if (source == NULL) {
+- int alen;
++ socklen_t alen;
+ int probe_fd = socket(AF_INET6, SOCK_DGRAM, 0);
+
+ if (probe_fd < 0) {
diff --git a/net-misc/iputils/files/iputils-20060512-kernel-ifaddr.patch b/net-misc/iputils/files/iputils-20060512-kernel-ifaddr.patch
new file mode 100644
index 00000000..de90efea
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20060512-kernel-ifaddr.patch
@@ -0,0 +1,85 @@
+--- rarpd.c.orig
++++ rarpd.c
+@@ -47,6 +47,14 @@
+ #endif
+ void usage(void) __attribute__((noreturn));
+
++struct kern_ifaddr
++{
++ struct kern_ifaddr *next;
++ __u32 prefix;
++ __u32 mask;
++ __u32 local;
++};
++
+ struct iflink
+ {
+ struct iflink *next;
+@@ -54,17 +62,9 @@
+ int hatype;
+ unsigned char lladdr[16];
+ unsigned char name[IFNAMSIZ];
+- struct ifaddr *ifa_list;
++ struct kern_ifaddr *ifa_list;
+ } *ifl_list;
+
+-struct ifaddr
+-{
+- struct ifaddr *next;
+- __u32 prefix;
+- __u32 mask;
+- __u32 local;
+-};
+-
+ struct rarp_map
+ {
+ struct rarp_map *next;
+@@ -91,7 +91,7 @@
+ int fd;
+ struct ifreq *ifrp, *ifend;
+ struct iflink *ifl;
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+ struct ifconf ifc;
+ struct ifreq ibuf[256];
+
+@@ -182,7 +182,7 @@
+ if (ifa == NULL) {
+ if (mask == 0 || prefix == 0)
+ continue;
+- ifa = (struct ifaddr*)malloc(sizeof(*ifa));
++ ifa = (struct kern_ifaddr*)malloc(sizeof(*ifa));
+ memset(ifa, 0, sizeof(*ifa));
+ ifa->local = addr;
+ ifa->prefix = prefix;
+@@ -238,10 +238,10 @@
+ return dent != NULL;
+ }
+
+-struct ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist)
++struct kern_ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist)
+ {
+ struct iflink *ifl;
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+ int retry = 0;
+ int i;
+
+@@ -297,7 +297,7 @@
+
+ if (r == NULL) {
+ if (hatype == ARPHRD_ETHER && halen == 6) {
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+ struct hostent *hp;
+ char ename[256];
+ static struct rarp_map emap = {
+@@ -370,7 +370,7 @@
+ {
+ __u32 laddr = 0;
+ struct iflink *ifl;
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+
+ for (ifl=ifl_list; ifl; ifl = ifl->next)
+ if (ifl->index == ifindex)
diff --git a/net-misc/iputils/files/iputils-20060512-linux-headers.patch b/net-misc/iputils/files/iputils-20060512-linux-headers.patch
new file mode 100644
index 00000000..0281f85d
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20060512-linux-headers.patch
@@ -0,0 +1,10 @@
+--- rdisc.c
++++ rdisc.c
+@@ -34,6 +34,7 @@
+ #include <sys/time.h>
+ /* Do not use "improved" glibc version! */
+ #include <linux/limits.h>
++#include <linux/types.h>
+
+ #include <sys/param.h>
+ #include <sys/socket.h>
diff --git a/net-misc/iputils/files/iputils-20060512-makefile.patch b/net-misc/iputils/files/iputils-20060512-makefile.patch
new file mode 100644
index 00000000..dbfd6f2f
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20060512-makefile.patch
@@ -0,0 +1,36 @@
+--- Makefile.orig
++++ Makefile
+@@ -1,20 +1,18 @@
+ # Path to parent kernel include files directory
+ LIBC_INCLUDE=/usr/include
+
+-DEFINES=
+-
+ #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
+ LDLIBS=-lresolv
+-ADDLIB=
+
+ #options if you compile with libc5, and without a bind>=4.9.4 libresolv
+ # NOT AVAILABLE. Please, use libresolv.
+
+-CC=gcc
++CC ?= gcc
+ # What a pity, all new gccs are buggy and -Werror does not work. Sigh.
+ #CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
+-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
+-CFLAGS=$(CCOPT) $(GLIBCFIX) -I../include $(DEFINES)
++CFLAGS ?= -O2 -g
++CFLAGS += -Wstrict-prototypes -Wall
++CPPFLAGS += -D_GNU_SOURCE
+
+ IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
+ IPV6_TARGETS=tracepath6 traceroute6 ping6
+@@ -35,7 +33,7 @@
+ rdisc_srv: rdisc_srv.o
+
+ rdisc_srv.o: rdisc.c
+- $(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
+
+
+ check-kernel:
diff --git a/net-misc/iputils/files/iputils-20070202-makefile.patch b/net-misc/iputils/files/iputils-20070202-makefile.patch
new file mode 100644
index 00000000..9426053a
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20070202-makefile.patch
@@ -0,0 +1,35 @@
+--- Makefile
++++ Makefile
+@@ -1,20 +1,17 @@
+ # Path to parent kernel include files directory
+ LIBC_INCLUDE=/usr/include
+
+-DEFINES=
+-
+ #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
+ LDLIBS=-lresolv
+-ADDLIB=
+
+ #options if you compile with libc5, and without a bind>=4.9.4 libresolv
+ # NOT AVAILABLE. Please, use libresolv.
+
+-CC=gcc
+ # What a pity, all new gccs are buggy and -Werror does not work. Sigh.
+ #CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
+-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
+-CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
++CFLAGS ?= -O2 -g
++CFLAGS += -Wstrict-prototypes -Wall
++CPPFLAGS += -D_GNU_SOURCE
+
+ IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
+ IPV6_TARGETS=tracepath6 traceroute6 ping6
+@@ -35,7 +32,7 @@
+ rdisc_srv: rdisc_srv.o
+
+ rdisc_srv.o: rdisc.c
+- $(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
+
+
+ check-kernel:
diff --git a/net-misc/iputils/iputils-20060512.ebuild b/net-misc/iputils/iputils-20060512.ebuild
new file mode 100644
index 00000000..6cb542b6
--- /dev/null
+++ b/net-misc/iputils/iputils-20060512.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20060512.ebuild,v 1.12 2007/06/26 02:32:34 mr_bones_ Exp $
+
+inherit flag-o-matic eutils toolchain-funcs
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.skbuff.net/iputils/"
+SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
+IUSE="static ipv6 doc minimal"
+
+DEPEND="virtual/os-headers
+ doc? (
+ app-text/openjade
+ dev-perl/SGMLSpm
+ app-text/docbook-sgml-dtd
+ app-text/docbook-sgml-utils
+ )"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}-s${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-021109-gcc34.patch
+ epatch "${FILESDIR}"/${P}-gcc4.patch
+ epatch "${FILESDIR}"/021109-ipg-linux-2.6.patch #71756
+ epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ epatch "${FILESDIR}"/${P}-kernel-ifaddr.patch
+ epatch "${FILESDIR}"/${P}-linux-headers.patch
+ epatch "${FILESDIR}"/${P}-RFC3542.patch
+
+ use static && append-ldflags -static
+ use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile
+}
+
+src_compile() {
+ tc-export CC
+ emake || die "make main failed"
+
+ # We include the extra check for docbook2html
+ # because when we emerge from a stage1/stage2,
+ # it may not exist #23156
+ if use doc && type -p docbook2html ; then
+ emake -j1 html man || die
+ fi
+}
+
+src_install() {
+ into /
+ dobin ping || die "ping"
+ use ipv6 && dobin ping6
+ dosbin arping || die "arping"
+ into /usr
+ dosbin tracepath || die "tracepath"
+ use ipv6 && dosbin trace{path,route}6
+ # X-MW: minimal
+ use minimal && rm rarpd ipg tftpd
+ dosbin clockdiff rdisc || die "misc sbin"
+
+ fperms 4711 /bin/ping
+ use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6
+
+ dodoc INSTALL RELNOTES
+
+ if use doc ; then
+ rm -f doc/setkey.8
+ use ipv6 \
+ && dosym ping.8 /usr/share/man/man8/ping6.8 \
+ || rm -f doc/*6.8
+ doman doc/*.8
+
+ dohtml doc/*.html
+ fi
+}