300-musl_fixes.patch 2.9 KB

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