summaryrefslogtreecommitdiff
path: root/package/traceroute/patches/patch-traceroute_extension_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/traceroute/patches/patch-traceroute_extension_c')
-rw-r--r--package/traceroute/patches/patch-traceroute_extension_c61
1 files changed, 61 insertions, 0 deletions
diff --git a/package/traceroute/patches/patch-traceroute_extension_c b/package/traceroute/patches/patch-traceroute_extension_c
new file mode 100644
index 000000000..94606f546
--- /dev/null
+++ b/package/traceroute/patches/patch-traceroute_extension_c
@@ -0,0 +1,61 @@
+--- traceroute-2.0.19.orig/traceroute/extension.c 2010-07-14 16:29:08.000000000 +0200
++++ traceroute-2.0.19/traceroute/extension.c 2013-12-29 20:01:35.000000000 +0100
+@@ -14,16 +14,16 @@ struct icmp_ext_header {
+ unsigned int reserved:4;
+ unsigned int version:4;
+ #endif
+- u_int8_t reserved1;
+- u_int16_t checksum;
++ uint8_t reserved1;
++ uint16_t checksum;
+ } __attribute__ ((packed));
+
+
+ struct icmp_ext_object {
+- u_int16_t length;
+- u_int8_t class;
+- u_int8_t c_type;
+- u_int8_t data[0];
++ uint16_t length;
++ uint8_t class;
++ uint8_t c_type;
++ uint8_t data[0];
+ };
+
+ #define MPLS_CLASS 1
+@@ -49,7 +49,7 @@ static int try_extension (probe *pb, cha
+ if (iext->version != 2) return -1;
+
+ if (iext->checksum &&
+- in_csum (iext, len) != (u_int16_t) ~0
++ in_csum (iext, len) != (uint16_t) ~0
+ ) return -1;
+
+ buf += sizeof (*iext);
+@@ -60,7 +60,7 @@ static int try_extension (probe *pb, cha
+ struct icmp_ext_object *obj = (struct icmp_ext_object *) buf;
+ size_t objlen = ntohs (obj->length);
+ size_t data_len;
+- u_int32_t *ui = (u_int32_t *) obj->data;
++ uint32_t *ui = (uint32_t *) obj->data;
+ int i, n;
+
+ if (objlen < sizeof (*obj) ||
+@@ -68,7 +68,7 @@ static int try_extension (probe *pb, cha
+ ) return -1;
+
+ data_len = objlen - sizeof (*obj);
+- if (data_len % sizeof (u_int32_t))
++ if (data_len % sizeof (uint32_t))
+ return -1; /* must be 32bit rounded... */
+
+ n = data_len / sizeof (*ui);
+@@ -85,7 +85,7 @@ static int try_extension (probe *pb, cha
+ do_snprintf (curr, end, "MPLS:");
+
+ for (i = 0; i < n; i++, ui++) {
+- u_int32_t mpls = ntohl (*ui);
++ uint32_t mpls = ntohl (*ui);
+
+ do_snprintf (curr, end, "%sL=%u,E=%u,S=%u,T=%u",
+ i ? "/" : "",