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.

40 lines
1.1 KiB

  1. --- a/common/resolver.c
  2. +++ b/common/resolver.c
  3. @@ -26,7 +26,7 @@
  4. int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
  5. {
  6. -#ifdef _LINUX
  7. +#if defined(_LINUX) && defined(__GLIBC__)
  8. struct __res_state res;
  9. #endif
  10. unsigned char answer[8192];
  11. @@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype
  12. uint16_t type = 0, class = 0;
  13. uint32_t ttl = 0;
  14. -#ifdef _LINUX
  15. +#if defined(_LINUX) && defined(__GLIBC__)
  16. memset(&res, 0, sizeof(res));
  17. res.options = RES_DEBUG;
  18. res_ninit(&res);
  19. @@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype
  20. #endif
  21. memset(answer, 0, sizeof(answer));
  22. -#ifdef _LINUX
  23. +#if defined(_LINUX) && defined(__GLIBC__)
  24. ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
  25. #else
  26. ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));
  27. --- a/common/dn_skipname.c
  28. +++ b/common/dn_skipname.c
  29. @@ -9,7 +9,7 @@
  30. * return:
  31. * 0 on success, -1 (with errno set) on failure.
  32. */
  33. -int ns_name_skip(const u_char **ptrptr, const u_char *eom)
  34. +static int ns_name_skip(const u_char **ptrptr, const u_char *eom)
  35. {
  36. const u_char *cp;
  37. u_int n;