0001-fix-build-with-musl.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From 2f2fde48594ec34e93ab409cd83442efe58e10ad Mon Sep 17 00:00:00 2001
  2. From: Brendan Heading <brendanheading@gmail.com>
  3. Date: Mon, 31 Aug 2015 15:24:44 +0100
  4. Subject: [PATCH 3/3] fix build with musl
  5. Add needed headers they are just not needed for glibc6+ but also
  6. for musl
  7. Define additional TCOPTS if not there
  8. u_initX types are in sys/types.h be explicit about it
  9. Upstream-Status: Pending
  10. bh: this is a copy of the patch at the link below, modified to remove
  11. the changes to include/libiptc/ipt_kernel_headers.h as these are
  12. already integrated in the upstream tree. See :
  13. http://lists.openembedded.org/pipermail/openembedded-core/2015-April/103613.html
  14. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  15. Signed-off-by: Brendan Heading <brendanheading@gmail.com>
  16. ---
  17. extensions/libxt_TCPOPTSTRIP.c | 15 +++++++++++++++
  18. include/linux/netfilter_ipv4/ip_tables.h | 1 +
  19. 2 files changed, 16 insertions(+)
  20. diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
  21. index 6897857..8a170b2 100644
  22. --- a/extensions/libxt_TCPOPTSTRIP.c
  23. +++ b/extensions/libxt_TCPOPTSTRIP.c
  24. @@ -12,6 +12,21 @@
  25. #ifndef TCPOPT_MD5SIG
  26. # define TCPOPT_MD5SIG 19
  27. #endif
  28. +#ifndef TCPOPT_MAXSEG
  29. +# define TCPOPT_MAXSEG 2
  30. +#endif
  31. +#ifndef TCPOPT_WINDOW
  32. +# define TCPOPT_WINDOW 3
  33. +#endif
  34. +#ifndef TCPOPT_SACK_PERMITTED
  35. +# define TCPOPT_SACK_PERMITTED 4
  36. +#endif
  37. +#ifndef TCPOPT_SACK
  38. +# define TCPOPT_SACK 5
  39. +#endif
  40. +#ifndef TCPOPT_TIMESTAMP
  41. +# define TCPOPT_TIMESTAMP 8
  42. +#endif
  43. enum {
  44. O_STRIP_OPTION = 0,
  45. diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
  46. index 57fd82a..4807246 100644
  47. --- a/include/linux/netfilter_ipv4/ip_tables.h
  48. +++ b/include/linux/netfilter_ipv4/ip_tables.h
  49. @@ -15,6 +15,7 @@
  50. #ifndef _IPTABLES_H
  51. #define _IPTABLES_H
  52. +#include <sys/types.h>
  53. #include <linux/types.h>
  54. #include <linux/netfilter_ipv4.h>
  55. --
  56. 2.4.3