300-resolver-uclibc.patch 927 B

1234567891011121314151617181920212223242526272829
  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__) && !defined(__UCLIBC__)
  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__) && !defined(__UCLIBC__)
  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__) && !defined(__UCLIBC__)
  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));