diff --git a/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-add-bits_types_h.patch b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-add-bits_types_h.patch new file mode 100644 index 00000000000..9ea341895d1 --- /dev/null +++ b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-add-bits_types_h.patch @@ -0,0 +1,94 @@ +diff -Naur iputils-s20121221.orig/clockdiff.c iputils-s20121221/clockdiff.c +--- iputils-s20121221.orig/clockdiff.c 2014-01-24 15:32:49.111934548 +0000 ++++ iputils-s20121221/clockdiff.c 2014-01-24 15:32:14.438932610 +0000 +@@ -23,6 +23,8 @@ + #include + #endif + ++#include "types.h" ++ + void usage(void) __attribute__((noreturn)); + + #define MAX_HOSTNAMELEN NI_MAXHOST +diff -Naur iputils-s20121221.orig/ping.c iputils-s20121221/ping.c +--- iputils-s20121221.orig/ping.c 2014-01-24 15:32:49.111934548 +0000 ++++ iputils-s20121221/ping.c 2014-01-24 15:32:14.459932611 +0000 +@@ -59,6 +59,7 @@ + */ + + #include "ping_common.h" ++#include "types.h" + + #include + #include +diff -Naur iputils-s20121221.orig/ping6.c iputils-s20121221/ping6.c +--- iputils-s20121221.orig/ping6.c 2014-01-24 15:32:49.112934549 +0000 ++++ iputils-s20121221/ping6.c 2014-01-24 15:32:14.439932610 +0000 +@@ -67,6 +67,7 @@ + * This program has to run SUID to ROOT to access the ICMP socket. + */ + #include "ping_common.h" ++#include "types.h" + + #include + #include +diff -Naur iputils-s20121221.orig/ping_common.c iputils-s20121221/ping_common.c +--- iputils-s20121221.orig/ping_common.c 2014-01-24 15:32:49.112934549 +0000 ++++ iputils-s20121221/ping_common.c 2014-01-24 15:32:14.439932610 +0000 +@@ -1,4 +1,5 @@ + #include "ping_common.h" ++#include "types.h" + #include + #include + #include +diff -Naur iputils-s20121221.orig/ping_common.h iputils-s20121221/ping_common.h +--- iputils-s20121221.orig/ping_common.h 2014-01-24 15:32:14.419932609 +0000 ++++ iputils-s20121221/ping_common.h 2014-01-24 15:33:08.206935616 +0000 +@@ -35,6 +35,7 @@ + #include + + #include "SNAPSHOT.h" ++#include "types.h" + + #define DEFDATALEN (64 - 8) /* default data length */ + +diff -Naur iputils-s20121221.orig/rdisc.c iputils-s20121221/rdisc.c +--- iputils-s20121221.orig/rdisc.c 2014-01-24 15:32:49.113934549 +0000 ++++ iputils-s20121221/rdisc.c 2014-01-24 15:32:14.450932610 +0000 +@@ -62,6 +62,7 @@ + #include + + #include "SNAPSHOT.h" ++#include "types.h" + + struct interface + { +diff -Naur iputils-s20121221.orig/traceroute6.c iputils-s20121221/traceroute6.c +--- iputils-s20121221.orig/traceroute6.c 2014-01-24 15:32:49.113934549 +0000 ++++ iputils-s20121221/traceroute6.c 2014-01-24 15:32:14.440932610 +0000 +@@ -267,6 +267,7 @@ + #include + #include + ++#include "types.h" + #include "SNAPSHOT.h" + + #ifndef SOL_IPV6 +diff -Naur iputils-s20121221.orig/types.h iputils-s20121221/types.h +--- iputils-s20121221.orig/types.h 1970-01-01 00:00:00.000000000 +0000 ++++ iputils-s20121221/types.h 2014-01-24 15:32:14.440932610 +0000 +@@ -0,0 +1,14 @@ ++/* This is a small version of from glibc ++ * to take care of type u_char. ++ * ++ * Anthony G. Basile ++ */ ++#ifndef _BITS_TYPES_H ++#define _BITS_TYPES_H 1 ++ ++typedef unsigned char u_char; ++typedef unsigned short int u_short; ++typedef unsigned int u_int; ++typedef unsigned long int u_long; ++ ++#endif /* mini */ diff --git a/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-crypto-build.patch b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-crypto-build.patch new file mode 100644 index 00000000000..1ec3c101d52 --- /dev/null +++ b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-crypto-build.patch @@ -0,0 +1,35 @@ +From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Wed, 16 Jan 2013 03:12:15 +0900 +Subject: [PATCH [iputils]] ping6: Fix build command line argument with gnutls. + +The ping6 command can use either openssl or gnutls... +and the Makefile has a bunch of setup for defining which of the two to use. + +Unfortunately, the final -D define on the commandline to enable gnutls +inside the ping6.c file didn't actually make it onto the gcc +commandline. +This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap. + +Signed-off-by: Arjan van de Ven +Signed-off-by: YOSHIFUJI Hideaki +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index c62d9df..89249f5 100644 +--- a/Makefile ++++ b/Makefile +@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP) + DEF_ping_common = $(DEF_CAP) $(DEF_IDN) + DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) + LIB_ping = $(LIB_CAP) $(LIB_IDN) +-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) ++DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO) + LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO) + + ping: ping_common.o +-- +1.8.0.2 + diff --git a/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-fix-init-elemnt.patch b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-fix-init-elemnt.patch new file mode 100644 index 00000000000..554ce9bd9bf --- /dev/null +++ b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-fix-init-elemnt.patch @@ -0,0 +1,23 @@ +diff -Naur iputils-s20121221.orig/ping.c iputils-s20121221/ping.c +--- iputils-s20121221.orig/ping.c 2014-01-24 15:05:02.082841335 +0000 ++++ iputils-s20121221/ping.c 2014-01-24 15:17:12.975882203 +0000 +@@ -774,9 +774,16 @@ + + do { + static struct iovec iov = {outpack, 0}; +- static struct msghdr m = { &whereto, sizeof(whereto), +- &iov, 1, &cmsg, 0, 0 }; +- m.msg_controllen = cmsg_len; ++ static struct msghdr m; ++ ++ m.msg_name = &whereto; ++ m.msg_namelen = sizeof(whereto); ++ m.msg_iov = &iov; ++ m.msg_iovlen = 1; ++ m.msg_control = &cmsg; ++ m.msg_controllen = sizeof(cmsg); ++ m.msg_flags = 0; ++ + iov.iov_len = cc; + + i = sendmsg(icmp_sock, &m, confirm); diff --git a/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-fix-musl-headers.patch b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-fix-musl-headers.patch new file mode 100644 index 00000000000..5f32bccab6f --- /dev/null +++ b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-fix-musl-headers.patch @@ -0,0 +1,108 @@ +diff -Naur iputils-s20121221.orig/arping.c iputils-s20121221/arping.c +--- iputils-s20121221.orig/arping.c 2012-12-21 14:01:07.000000000 +0000 ++++ iputils-s20121221/arping.c 2014-01-23 21:19:57.091268011 +0000 +@@ -16,7 +16,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- iputils-s20121221.orig/clockdiff.c 2012-12-21 14:01:07.000000000 +0000 ++++ iputils-s20121221/clockdiff.c 2014-01-23 21:19:57.093268011 +0000 +@@ -14,7 +14,6 @@ + #include + #include + #define TSPTYPES +-#include + #include + #include + #include +diff -Naur iputils-s20121221.orig/ping_common.h iputils-s20121221/ping_common.h +--- iputils-s20121221.orig/ping_common.h 2012-12-21 14:01:07.000000000 +0000 ++++ iputils-s20121221/ping_common.h 2014-01-23 21:27:07.677292088 +0000 +@@ -7,16 +7,17 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +-#include ++#include + #include + #include + #include + #include + #include ++#include + + #ifdef CAPABILITIES + #include +--- iputils-s20121221.orig/rarpd.c 2014-01-24 13:38:46.816551953 +0000 ++++ iputils-s20121221/rarpd.c 2014-01-24 13:36:51.833545524 +0000 +@@ -19,16 +19,17 @@ + #include + #include + #include +-#include +-#include +-#include ++#include ++#include ++#include + #include +-#include ++#include + #include + #include + #include + #include + #include ++#include + + int do_reload = 1; + +--- iputils-s20121221.orig/tracepath.c 2014-01-24 13:38:46.865551956 +0000 ++++ iputils-s20121221/tracepath.c 2014-01-23 21:19:57.109268012 +0000 +@@ -23,6 +23,8 @@ + #include + #include + #include ++#include ++#include + #ifdef USE_IDN + #include + #include +--- iputils-s20121221.orig/tracepath6.c 2014-01-24 13:38:46.865551956 +0000 ++++ iputils-s20121221/tracepath6.c 2014-01-23 21:20:40.316270428 +0000 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #ifdef USE_IDN + #include +--- a/tracepath.c.orig 2014-11-10 16:57:16.549029140 +0100 ++++ b/tracepath.c 2014-11-10 16:57:37.996240185 +0100 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -23,7 +24,6 @@ + #include + #include + #include +-#include + #include + #ifdef USE_IDN + #include diff --git a/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-printf-size.patch b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-printf-size.patch new file mode 100644 index 00000000000..6d6c3b7d258 --- /dev/null +++ b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-printf-size.patch @@ -0,0 +1,64 @@ +From 23fcb10ae15a96aa9e5a823cfe0b612d9522691c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 14 Aug 2010 01:16:42 -0400 +Subject: [PATCH [iputils]] tracepath: re-use printf return in print_host + +Since the printf funcs already return the length of chars displayed, +use that value instead of re-calculating the length with strlen. + +This also fixes the handling of the strlen return -- it's a size_t, +not an int. + +Signed-off-by: Mike Frysinger +--- + tracepath.c | 11 ++++------- + tracepath6.c | 11 ++++------- + 2 files changed, 8 insertions(+), 14 deletions(-) + +diff --git a/tracepath.c b/tracepath.c +index 8a08f1d..f155816 100644 +--- a/tracepath.c ++++ b/tracepath.c +@@ -73,13 +73,10 @@ void data_wait(int fd) + + void print_host(const char *a, const char *b, int both) + { +- int plen = 0; +- printf("%s", a); +- plen = strlen(a); +- if (both) { +- printf(" (%s)", b); +- plen += strlen(b) + 3; +- } ++ int plen; ++ plen = printf("%s", a); ++ if (both) ++ plen += printf(" (%s)", b); + if (plen >= HOST_COLUMN_SIZE) + plen = HOST_COLUMN_SIZE - 1; + printf("%*s", HOST_COLUMN_SIZE - plen, ""); +diff --git a/tracepath6.c b/tracepath6.c +index 126fadf..bee95c3 100644 +--- a/tracepath6.c ++++ b/tracepath6.c +@@ -86,13 +86,10 @@ void data_wait(int fd) + + void print_host(const char *a, const char *b, int both) + { +- int plen = 0; +- printf("%s", a); +- plen = strlen(a); +- if (both) { +- printf(" (%s)", b); +- plen += strlen(b) + 3; +- } ++ int plen; ++ plen = printf("%s", a); ++ if (both) ++ plen += printf(" (%s)", b); + if (plen >= HOST_COLUMN_SIZE) + plen = HOST_COLUMN_SIZE - 1; + printf("%*s", HOST_COLUMN_SIZE - plen, ""); +-- +1.8.0.2 + diff --git a/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-remove-rdisc-glibc-assumption.patch b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-remove-rdisc-glibc-assumption.patch new file mode 100644 index 00000000000..08e764dde60 --- /dev/null +++ b/srcpkgs/iputils/patches/net-misc_iputils_files_iputils-20121221-remove-rdisc-glibc-assumption.patch @@ -0,0 +1,30 @@ +diff -Naur iputils-s20121221.orig/rdisc.c iputils-s20121221/rdisc.c +--- iputils-s20121221.orig/rdisc.c 2014-01-24 14:59:29.937822762 +0000 ++++ iputils-s20121221/rdisc.c 2014-01-23 21:25:58.760288234 +0000 +@@ -115,26 +114,7 @@ + + #define MAXIFS 32 + +-#if !defined(__GLIBC__) || __GLIBC__ < 2 +-/* For router advertisement */ +-struct icmp_ra +-{ +- u_char icmp_type; /* type of message, see below */ +- u_char icmp_code; /* type sub code */ +- u_short icmp_cksum; /* ones complement cksum of struct */ +- u_char icmp_num_addrs; +- u_char icmp_wpa; /* Words per address */ +- short icmp_lifetime; +-}; +- +-struct icmp_ra_addr +-{ +- __u32 ira_addr; +- __u32 ira_preference; +-}; +-#else + #define icmp_ra icmp +-#endif + + /* Router constants */ + #define MAX_INITIAL_ADVERT_INTERVAL 16 diff --git a/srcpkgs/iputils/template b/srcpkgs/iputils/template index 62c9b3267dc..185253512cb 100644 --- a/srcpkgs/iputils/template +++ b/srcpkgs/iputils/template @@ -1,7 +1,7 @@ # Template file for 'iputils' pkgname=iputils version=20121221 -revision=4 +revision=5 patch_args="-Np1" wrksrc="${pkgname}-s${version}" makedepends="libressl-devel libcap-devel"