300-musl_fixes.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. --- a/extensions/libip6t_ipv6header.c
  2. +++ b/extensions/libip6t_ipv6header.c
  3. @@ -10,6 +10,9 @@ on whether they contain certain headers
  4. #include <netdb.h>
  5. #include <xtables.h>
  6. #include <linux/netfilter_ipv6/ip6t_ipv6header.h>
  7. +#ifndef IPPROTO_HOPOPTS
  8. +# define IPPROTO_HOPOPTS 0
  9. +#endif
  10. enum {
  11. O_HEADER = 0,
  12. --- a/extensions/libxt_TCPOPTSTRIP.c
  13. +++ b/extensions/libxt_TCPOPTSTRIP.c
  14. @@ -12,6 +12,21 @@
  15. #ifndef TCPOPT_MD5SIG
  16. # define TCPOPT_MD5SIG 19
  17. #endif
  18. +#ifndef TCPOPT_MAXSEG
  19. +# define TCPOPT_MAXSEG 2
  20. +#endif
  21. +#ifndef TCPOPT_WINDOW
  22. +# define TCPOPT_WINDOW 3
  23. +#endif
  24. +#ifndef TCPOPT_SACK_PERMITTED
  25. +# define TCPOPT_SACK_PERMITTED 4
  26. +#endif
  27. +#ifndef TCPOPT_SACK
  28. +# define TCPOPT_SACK 5
  29. +#endif
  30. +#ifndef TCPOPT_TIMESTAMP
  31. +# define TCPOPT_TIMESTAMP 8
  32. +#endif
  33. enum {
  34. O_STRIP_OPTION = 0,
  35. --- a/include/libiptc/ipt_kernel_headers.h
  36. +++ b/include/libiptc/ipt_kernel_headers.h
  37. @@ -5,7 +5,6 @@
  38. #include <limits.h>
  39. -#if defined(__GLIBC__) && __GLIBC__ == 2
  40. #include <netinet/ip.h>
  41. #include <netinet/in.h>
  42. #include <netinet/ip_icmp.h>
  43. @@ -13,15 +12,4 @@
  44. #include <netinet/udp.h>
  45. #include <net/if.h>
  46. #include <sys/types.h>
  47. -#else /* libc5 */
  48. -#include <sys/socket.h>
  49. -#include <linux/ip.h>
  50. -#include <linux/in.h>
  51. -#include <linux/if.h>
  52. -#include <linux/icmp.h>
  53. -#include <linux/tcp.h>
  54. -#include <linux/udp.h>
  55. -#include <linux/types.h>
  56. -#include <linux/in6.h>
  57. -#endif
  58. #endif
  59. --- a/include/linux/netfilter_ipv4/ip_tables.h
  60. +++ b/include/linux/netfilter_ipv4/ip_tables.h
  61. @@ -16,6 +16,7 @@
  62. #define _IPTABLES_H
  63. #include <linux/types.h>
  64. +#include <sys/types.h>
  65. #include <linux/netfilter_ipv4.h>
  66. --- a/iptables/ip6tables-restore.c
  67. +++ b/iptables/ip6tables-restore.c
  68. @@ -9,7 +9,7 @@
  69. */
  70. #include <getopt.h>
  71. -#include <sys/errno.h>
  72. +#include <errno.h>
  73. #include <stdbool.h>
  74. #include <string.h>
  75. #include <stdio.h>
  76. --- a/iptables/ip6tables-save.c
  77. +++ b/iptables/ip6tables-save.c
  78. @@ -6,7 +6,7 @@
  79. * This code is distributed under the terms of GNU GPL v2
  80. */
  81. #include <getopt.h>
  82. -#include <sys/errno.h>
  83. +#include <errno.h>
  84. #include <stdio.h>
  85. #include <fcntl.h>
  86. #include <stdlib.h>
  87. --- a/iptables/iptables-restore.c
  88. +++ b/iptables/iptables-restore.c
  89. @@ -6,7 +6,7 @@
  90. */
  91. #include <getopt.h>
  92. -#include <sys/errno.h>
  93. +#include <errno.h>
  94. #include <stdbool.h>
  95. #include <string.h>
  96. #include <stdio.h>
  97. --- a/iptables/iptables-save.c
  98. +++ b/iptables/iptables-save.c
  99. @@ -6,7 +6,7 @@
  100. *
  101. */
  102. #include <getopt.h>
  103. -#include <sys/errno.h>
  104. +#include <errno.h>
  105. #include <stdio.h>
  106. #include <fcntl.h>
  107. #include <stdlib.h>
  108. --- a/iptables/iptables-xml.c
  109. +++ b/iptables/iptables-xml.c
  110. @@ -7,7 +7,7 @@
  111. */
  112. #include <getopt.h>
  113. -#include <sys/errno.h>
  114. +#include <errno.h>
  115. #include <string.h>
  116. #include <stdio.h>
  117. #include <stdlib.h>