diff options
3 files changed, 146 insertions, 0 deletions
diff --git a/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch b/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch new file mode 100644 index 0000000000..20ef07e44a --- /dev/null +++ b/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 6 Jan 2016 14:14:22 -0800 | ||
| 4 | Subject: [PATCH] Fix header inclusion for musl | ||
| 5 | |||
| 6 | Fix errors e.g. | ||
| 7 | |||
| 8 | In file included from tracepath.c:17:0: | ||
| 9 | /usr/include/linux/errqueue.h:33:18: | ||
| 10 | error: array type has incomplete element type 'struct timespec' | ||
| 11 | struct timespec ts[3]; | ||
| 12 | ^ | ||
| 13 | tracepath.c: In function 'main': | ||
| 14 | tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this | ||
| 15 | function) | ||
| 16 | overhead, INT_MAX); | ||
| 17 | ^ | ||
| 18 | tracepath.c:329:16: note: each undeclared identifier is reported only | ||
| 19 | once for each function it appears in | ||
| 20 | Makefile:131: recipe for target 'tracepath.o' failed | ||
| 21 | make: *** [tracepath.o] Error 1 | ||
| 22 | |||
| 23 | ping_common.c: In function 'main_loop': | ||
| 24 | ping_common.c:756:15: error: 'HZ' undeclared (first use in this | ||
| 25 | function) | ||
| 26 | if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ && | ||
| 27 | next * HZ <= 1000)) { | ||
| 28 | |||
| 29 | protocols/timed.h is not needed and is absent in musl | ||
| 30 | |||
| 31 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 32 | --- | ||
| 33 | Upstream-Status: Pending | ||
| 34 | |||
| 35 | clockdiff.c | 1 - | ||
| 36 | ping_common.c | 1 + | ||
| 37 | tracepath.c | 2 ++ | ||
| 38 | tracepath6.c | 1 + | ||
| 39 | 4 files changed, 4 insertions(+), 1 deletion(-) | ||
| 40 | |||
| 41 | diff --git a/clockdiff.c b/clockdiff.c | ||
| 42 | index 7c1ea1b..1d6341e 100644 | ||
| 43 | --- a/clockdiff.c | ||
| 44 | +++ b/clockdiff.c | ||
| 45 | @@ -14,7 +14,6 @@ | ||
| 46 | #include <netinet/ip.h> | ||
| 47 | #include <netinet/ip_icmp.h> | ||
| 48 | #define TSPTYPES | ||
| 49 | -#include <protocols/timed.h> | ||
| 50 | #include <fcntl.h> | ||
| 51 | #include <netdb.h> | ||
| 52 | #include <arpa/inet.h> | ||
| 53 | diff --git a/ping_common.c b/ping_common.c | ||
| 54 | index 7f82851..3ce699d 100644 | ||
| 55 | --- a/ping_common.c | ||
| 56 | +++ b/ping_common.c | ||
| 57 | @@ -2,6 +2,7 @@ | ||
| 58 | #include <ctype.h> | ||
| 59 | #include <sched.h> | ||
| 60 | #include <math.h> | ||
| 61 | +#include <asm-generic/param.h> | ||
| 62 | |||
| 63 | int options; | ||
| 64 | |||
| 65 | diff --git a/tracepath.c b/tracepath.c | ||
| 66 | index 89e6d16..c9d6ddd 100644 | ||
| 67 | --- a/tracepath.c | ||
| 68 | +++ b/tracepath.c | ||
| 69 | @@ -12,6 +12,8 @@ | ||
| 70 | #include <stdio.h> | ||
| 71 | #include <stdlib.h> | ||
| 72 | #include <unistd.h> | ||
| 73 | +#include <limits.h> | ||
| 74 | +#include <time.h> | ||
| 75 | #include <sys/socket.h> | ||
| 76 | #include <linux/types.h> | ||
| 77 | #include <linux/errqueue.h> | ||
| 78 | diff --git a/tracepath6.c b/tracepath6.c | ||
| 79 | index 126fadf..9d5745c 100644 | ||
| 80 | --- a/tracepath6.c | ||
| 81 | +++ b/tracepath6.c | ||
| 82 | @@ -12,6 +12,7 @@ | ||
| 83 | #include <stdio.h> | ||
| 84 | #include <stdlib.h> | ||
| 85 | #include <unistd.h> | ||
| 86 | +#include <limits.h> | ||
| 87 | #include <sys/socket.h> | ||
| 88 | #include <netinet/in.h> | ||
| 89 | #include <netinet/icmp6.h> | ||
| 90 | -- | ||
| 91 | 2.6.4 | ||
| 92 | |||
diff --git a/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch b/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch new file mode 100644 index 0000000000..6da01dc616 --- /dev/null +++ b/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | From 000629f74908a2a95f6104444c77ad93cf40d62d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 13 Jan 2016 08:50:50 +0000 | ||
| 4 | Subject: [PATCH] Intialize struct elements by name | ||
| 5 | |||
| 6 | makes it portable across glibc and musl | ||
| 7 | |||
| 8 | Fixes errors | ||
| 9 | |||
| 10 | | ping.c: In function 'send_probe': | ||
| 11 | | ping.c:735:19: warning: initialization makes integer from pointer | ||
| 12 | without a cast [-Wint-conversion] | ||
| 13 | | &iov, 1, &cmsg, 0, 0 }; | ||
| 14 | | ^ | ||
| 15 | | ping.c:735:19: note: (near initialization for 'm.__pad1') | ||
| 16 | | ping.c:735:19: error: initializer element is not computable at load | ||
| 17 | time | ||
| 18 | | ping.c:735:19: note: (near initialization for 'm.__pad1') | ||
| 19 | | make: *** [ping.o] Error 1 | ||
| 20 | |||
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 22 | --- | ||
| 23 | Upstream-Status: Pending | ||
| 24 | |||
| 25 | ping.c | 11 +++++++++-- | ||
| 26 | 1 file changed, 9 insertions(+), 2 deletions(-) | ||
| 27 | |||
| 28 | diff --git a/ping.c b/ping.c | ||
| 29 | index 4989760..e67f381 100644 | ||
| 30 | --- a/ping.c | ||
| 31 | +++ b/ping.c | ||
| 32 | @@ -731,8 +731,15 @@ int send_probe() | ||
| 33 | |||
| 34 | do { | ||
| 35 | static struct iovec iov = {outpack, 0}; | ||
| 36 | - static struct msghdr m = { &whereto, sizeof(whereto), | ||
| 37 | - &iov, 1, &cmsg, 0, 0 }; | ||
| 38 | + static struct msghdr m = { | ||
| 39 | + .msg_name = &whereto, | ||
| 40 | + .msg_namelen = sizeof(whereto), | ||
| 41 | + .msg_iov = &iov, | ||
| 42 | + .msg_iovlen = 1, | ||
| 43 | + .msg_control = &cmsg, | ||
| 44 | + .msg_controllen = 0, | ||
| 45 | + .msg_flags= 0, | ||
| 46 | + }; | ||
| 47 | m.msg_controllen = cmsg_len; | ||
| 48 | iov.iov_len = cc; | ||
| 49 | |||
| 50 | -- | ||
| 51 | 2.7.0 | ||
| 52 | |||
diff --git a/meta/recipes-extended/iputils/iputils_s20151218.bb b/meta/recipes-extended/iputils/iputils_s20151218.bb index 4c3523d425..62c3c818ba 100644 --- a/meta/recipes-extended/iputils/iputils_s20151218.bb +++ b/meta/recipes-extended/iputils/iputils_s20151218.bb | |||
| @@ -18,6 +18,8 @@ SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ | |||
| 18 | file://debian/use_gethostbyname2.diff \ | 18 | file://debian/use_gethostbyname2.diff \ |
| 19 | file://debian/targets.diff \ | 19 | file://debian/targets.diff \ |
| 20 | file://nsgmls-path-fix.patch \ | 20 | file://nsgmls-path-fix.patch \ |
| 21 | file://0001-Fix-header-inclusion-for-musl.patch \ | ||
| 22 | file://0001-Intialize-struct-elements-by-name.patch \ | ||
| 21 | " | 23 | " |
| 22 | 24 | ||
| 23 | SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce" | 25 | SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce" |
