/poky/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch

https://github.com/openbmc/openbmc · Patch · 45 lines · 40 code · 5 blank · 0 comment · 0 complexity · 2e420af070f72a746a4b6d4a8b695999 MD5 · raw file

  1. From 081c6be2f2f1cd77f399ea414f8d89c107826624 Mon Sep 17 00:00:00 2001
  2. From: Alexander Kanavin <alex.kanavin@gmail.com>
  3. Date: Fri, 22 May 2020 15:29:23 +0000
  4. Subject: [PATCH] Fix musl build
  5. methods/connect.cc: Musl doesn't support AI_IDN flag in netdb.h
  6. header so define it manually.
  7. apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h
  8. to avoid errors in types u_int_SIZE.
  9. Upstream-Status: Pending
  10. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  11. ---
  12. apt-pkg/contrib/srvrec.h | 1 +
  13. methods/connect.cc | 5 +++++
  14. 2 files changed, 6 insertions(+)
  15. diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
  16. index e22b7a1..b1115f5 100644
  17. --- a/apt-pkg/contrib/srvrec.h
  18. +++ b/apt-pkg/contrib/srvrec.h
  19. @@ -9,6 +9,7 @@
  20. #ifndef SRVREC_H
  21. #define SRVREC_H
  22. +#include <sys/types.h>
  23. #include <string>
  24. #include <vector>
  25. #include <arpa/nameser.h>
  26. diff --git a/methods/connect.cc b/methods/connect.cc
  27. index 1d6f891..122df35 100644
  28. --- a/methods/connect.cc
  29. +++ b/methods/connect.cc
  30. @@ -42,6 +42,11 @@
  31. #include "connect.h"
  32. #include "rfc2553emu.h"
  33. #include <apti18n.h>
  34. +
  35. +#ifndef AI_IDN
  36. +#define AI_IDN 0x0040
  37. +#endif
  38. +
  39. /*}}}*/
  40. static std::string LastHost;