020-include_fixes.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #include "SNAPSHOT.h"
  22. +#ifndef HZ
  23. +#define HZ 100
  24. +#endif
  25. +
  26. #define DEFDATALEN (64 - 8) /* default data length */
  27. #define MAXWAIT 10 /* max seconds to wait for response */
  28. --- a/clockdiff.c
  29. +++ b/clockdiff.c
  30. @@ -13,8 +13,6 @@
  31. #include <netinet/in.h>
  32. #include <netinet/ip.h>
  33. #include <netinet/ip_icmp.h>
  34. -#define TSPTYPES
  35. -#include <protocols/timed.h>
  36. #include <fcntl.h>
  37. #include <netdb.h>
  38. #include <arpa/inet.h>
  39. --- a/tracepath.c
  40. +++ b/tracepath.c
  41. @@ -13,6 +13,7 @@
  42. #include <stdlib.h>
  43. #include <unistd.h>
  44. #include <sys/socket.h>
  45. +#include <sys/time.h>
  46. #include <linux/types.h>
  47. #include <linux/errqueue.h>
  48. #include <errno.h>
  49. --- a/ping.c
  50. +++ b/ping.c
  51. @@ -661,8 +661,15 @@ int send_probe()
  52. do {
  53. static struct iovec iov = {outpack, 0};
  54. - static struct msghdr m = { &whereto, sizeof(whereto),
  55. - &iov, 1, &cmsg, 0, 0 };
  56. + static struct msghdr m = {
  57. + .msg_name = &whereto,
  58. + .msg_namelen = sizeof(whereto),
  59. + .msg_iov = &iov,
  60. + .msg_iovlen = 1,
  61. + .msg_control = &cmsg,
  62. + .msg_controllen = 0,
  63. + .msg_flags = 0
  64. + };
  65. m.msg_controllen = cmsg_len;
  66. iov.iov_len = cc;