0002-add-missing-defines.patch 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Add missing MSG_CMSG_CLOEXEC
  2. Unpatched uClibc toolchains, even using the latest 0.9.33.2, do not
  3. have the MSG_CMSG_CLOEXEC definition. Even though the Buildroot
  4. internal toolchain backend has a uClibc patch to provide it, it
  5. doesn't apply to external toolchains. This patch provides the
  6. definition of MSG_CMSG_CLOEXEC.
  7. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  8. Index: b/libnetlink.h
  9. ===================================================================
  10. --- a/libnetlink.h
  11. +++ b/libnetlink.h
  12. @@ -7,6 +7,10 @@
  13. #include <linux/netlink.h>
  14. #include <linux/rtnetlink.h>
  15. +#ifndef MSG_CMSG_CLOEXEC
  16. +#define MSG_CMSG_CLOEXEC 0x40000000
  17. +#endif
  18. +
  19. struct rtnl_handle
  20. {
  21. int fd;
  22. Index: b/kacpimon/libnetlink.h
  23. ===================================================================
  24. --- a/kacpimon/libnetlink.h
  25. +++ b/kacpimon/libnetlink.h
  26. @@ -7,6 +7,10 @@
  27. #include <linux/netlink.h>
  28. #include <linux/rtnetlink.h>
  29. +#ifndef MSG_CMSG_CLOEXEC
  30. +#define MSG_CMSG_CLOEXEC 0x40000000
  31. +#endif
  32. +
  33. struct rtnl_handle
  34. {
  35. int fd;