0002-Add-missing-sys-types.h-include.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 560dee4b4be54699c0c9679771c9e0d61e4db80a Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Thu, 19 Nov 2015 17:48:55 +0100
  4. Subject: [PATCH] Add missing <sys/types.h> include
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The u_intXX_t types are defined in <sys/types.h>, so it should be
  9. included before using those types. Otherwise, with certain C
  10. libraries, the build fails with:
  11. In file included from ../include/iptables.h:4:0,
  12. from m_ipt.c:18:
  13. ../include/iptables_common.h:47:16: error: unknown type name ‘u_int32_t’
  14. #define __le32 u_int32_t
  15. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  16. ---
  17. include/iptables_common.h | 2 ++
  18. 1 file changed, 2 insertions(+)
  19. diff --git a/include/iptables_common.h b/include/iptables_common.h
  20. index 9099667..2c27a4b 100644
  21. --- a/include/iptables_common.h
  22. +++ b/include/iptables_common.h
  23. @@ -43,6 +43,8 @@ extern char *lib_dir;
  24. extern void init_extensions(void);
  25. #endif
  26. +#include <sys/types.h>
  27. +
  28. #define __be32 u_int32_t
  29. #define __le32 u_int32_t
  30. #define __be16 u_int16_t
  31. --
  32. 2.6.3