add chaos_calmer branch
[15.05/openwrt.git] / package / network / utils / iputils / patches / 020-include_fixes.patch
1 --- a/ping_common.h
2 +++ b/ping_common.h
3 @@ -2,6 +2,7 @@
4  #include <stdlib.h>
5  #include <unistd.h>
6  #include <time.h>
7 +#include <sys/types.h>
8  #include <sys/param.h>
9  #include <sys/socket.h>
10  #include <linux/sockios.h>
11 @@ -11,7 +12,7 @@
12  #include <sys/ioctl.h>
13  #include <net/if.h>
14  #include <sys/uio.h>
15 -#include <sys/poll.h>
16 +#include <poll.h>
17  #include <ctype.h>
18  #include <errno.h>
19  #include <string.h>
20 @@ -24,6 +25,10 @@
21  
22  #include "SNAPSHOT.h"
23  
24 +#ifndef HZ
25 +#define HZ 100
26 +#endif
27 +
28  #define        DEFDATALEN      (64 - 8)        /* default data length */
29  
30  #define        MAXWAIT         10              /* max seconds to wait for response */
31 --- a/clockdiff.c
32 +++ b/clockdiff.c
33 @@ -13,8 +13,6 @@
34  #include <netinet/in.h>
35  #include <netinet/ip.h>
36  #include <netinet/ip_icmp.h>
37 -#define TSPTYPES
38 -#include <protocols/timed.h>
39  #include <fcntl.h>
40  #include <netdb.h>
41  #include <arpa/inet.h>
42 --- a/tracepath.c
43 +++ b/tracepath.c
44 @@ -13,6 +13,7 @@
45  #include <stdlib.h>
46  #include <unistd.h>
47  #include <sys/socket.h>
48 +#include <sys/time.h>
49  #include <linux/types.h>
50  #include <linux/errqueue.h>
51  #include <errno.h>
52 --- a/ping.c
53 +++ b/ping.c
54 @@ -661,8 +661,15 @@ int send_probe()
55  
56         do {
57                 static struct iovec iov = {outpack, 0};
58 -               static struct msghdr m = { &whereto, sizeof(whereto),
59 -                                                  &iov, 1, &cmsg, 0, 0 };
60 +               static struct msghdr m = {
61 +                       .msg_name = &whereto,
62 +                       .msg_namelen = sizeof(whereto),
63 +                       .msg_iov = &iov,
64 +                       .msg_iovlen = 1,
65 +                       .msg_control = &cmsg,
66 +                       .msg_controllen = 0,
67 +                       .msg_flags = 0
68 +               };
69                 m.msg_controllen = cmsg_len;
70                 iov.iov_len = cc;
71