qt5base-0004-QDnsLookup-Fix-build-with-uClibc.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From af2241c678bcd9af58d38f98f5caec96a498733e Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= <fatih.asici@gmail.com>
  3. Date: Fri, 23 May 2014 17:02:01 +0300
  4. Subject: [PATCH] QDnsLookup: Fix build with uClibc
  5. uClibc doesn't have a nsmap member in __res_state. Since it also doesn't have
  6. res_nquery() which is mandatory for QDnsLookup, we can simply disable the code
  7. to fix the build.
  8. Sent-Upstream: https://codereview.qt-project.org/86159
  9. Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com>
  10. Change-Id: Ia872f535519aca3a2de763548c6dd0e3e0ee20d4
  11. ---
  12. src/network/kernel/qdnslookup_unix.cpp | 2 ++
  13. 1 file changed, 2 insertions(+)
  14. diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
  15. index 26834df..2a482a6 100644
  16. --- a/src/network/kernel/qdnslookup_unix.cpp
  17. +++ b/src/network/kernel/qdnslookup_unix.cpp
  18. @@ -160,9 +160,11 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
  19. Q_CHECK_PTR(ns);
  20. state._u._ext.nsaddrs[0] = ns;
  21. }
  22. +#ifndef __UCLIBC__
  23. // Set nsmap[] to indicate that nsaddrs[0] is an IPv6 address
  24. // See: https://sourceware.org/ml/libc-hacker/2002-05/msg00035.html
  25. state._u._ext.nsmap[0] = MAXNS + 1;
  26. +#endif
  27. state._u._ext.nscount6 = 1;
  28. ns->sin6_family = AF_INET6;
  29. ns->sin6_port = htons(53);
  30. --
  31. 1.9.1