You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

  1. From 4fe5b1f216f1643080299bdb35e07f07b9c2caae Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Thu, 2 May 2019 22:28:57 -0700
  4. Subject: [PATCH] dns_lookup: Fix compilation with uClibc-ng
  5. uClibc-ng does not have res_send or res_nsend. ifdef the entire function.
  6. ---
  7. src/dns/dns_lookup.c | 5 +++++
  8. 1 file changed, 5 insertions(+)
  9. diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c
  10. index 1ea98b3..d7771d4 100644
  11. --- a/src/dns/dns_lookup.c
  12. +++ b/src/dns/dns_lookup.c
  13. @@ -311,6 +311,10 @@ typedef struct DNS_REPLY {
  14. static int dns_res_query(const char *name, int class, int type,
  15. unsigned char *answer, int anslen)
  16. {
  17. +#ifdef __UCLIBC__
  18. + msg_info("dns_res_query() is not supported under uClibc");
  19. + return 0;
  20. +#else
  21. unsigned char msg_buf[MAX_DNS_QUERY_SIZE];
  22. HEADER *reply_header = (HEADER *) answer;
  23. int len;
  24. @@ -369,6 +373,7 @@ static int dns_res_query(const char *name, int class, int type,
  25. }
  26. return (len);
  27. }
  28. +#endif
  29. }
  30. /* dns_res_search - res_search() that can return negative replies */
  31. --
  32. 2.17.1