summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch')
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch83
1 files changed, 0 insertions, 83 deletions
diff --git a/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
deleted file mode 100644
index 24c134fcac..0000000000
--- a/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html
2
3Upstream-Status: Pending
4
5Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
6---
7 ping/ping_common.h | 20 ++++++++++++++++++++
8 1 file changed, 20 insertions(+)
9
10diff --git a/ping/ping_common.h b/ping/ping_common.h
11index 1dfd1b5..3bfbd12 100644
12--- a/ping/ping_common.h
13+++ b/ping/ping_common.h
14@@ -17,10 +17,14 @@
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see `http://www.gnu.org/licenses/'. */
17
18+#include <config.h>
19+
20 #include <netinet/in_systm.h>
21 #include <netinet/in.h>
22 #include <netinet/ip.h>
23+#ifdef HAVE_IPV6
24 #include <netinet/icmp6.h>
25+#endif
26 #include <icmp.h>
27 #include <error.h>
28 #include <progname.h>
29@@ -62,7 +66,12 @@ struct ping_stat
30 want to follow the traditional behaviour of ping. */
31 #define DEFAULT_PING_COUNT 0
32
33+#ifdef HAVE_IPV6
34 #define PING_HEADER_LEN (USE_IPV6 ? sizeof (struct icmp6_hdr) : ICMP_MINLEN)
35+#else
36+#define PING_HEADER_LEN (ICMP_MINLEN)
37+#endif
38+
39 #define PING_TIMING(s) ((s) >= sizeof (struct timeval))
40 #define PING_DATALEN (64 - PING_HEADER_LEN) /* default data length */
41
42@@ -74,13 +83,20 @@ struct ping_stat
43 (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\
44 } while (0)
45
46+#ifdef HAVE_IPV6
47 /* FIXME: Adjust IPv6 case for options and their consumption. */
48 #define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \
49 (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN))
50
51+#else
52+#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)
53+#endif
54+
55+#ifdef HAVE_IPV6
56 typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest,
57 struct sockaddr_in6 * from, struct icmp6_hdr * icmp,
58 int datalen);
59+#endif
60
61 typedef int (*ping_efp) (int code,
62 void *closure,
63@@ -89,13 +105,17 @@ typedef int (*ping_efp) (int code,
64 struct ip * ip, icmphdr_t * icmp, int datalen);
65
66 union event {
67+#ifdef HAVE_IPV6
68 ping_efp6 handler6;
69+#endif
70 ping_efp handler;
71 };
72
73 union ping_address {
74 struct sockaddr_in ping_sockaddr;
75+#ifdef HAVE_IPV6
76 struct sockaddr_in6 ping_sockaddr6;
77+#endif
78 };
79
80 typedef struct ping_data PING;
81--
822.8.3
83