summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Poplawski <jacek.poplawski@qt.io>2023-07-24 09:15:27 +0200
committerJacek Poplawski <jacek.poplawski@qt.io>2023-07-26 09:03:38 +0200
commite73e972aa602906f15041ac0d7d6151883532599 (patch)
treea43e6505dd11b5b85340409263fc09641468f047
parent2f3e76da63628b8447679bed1a8bdc7cad449080 (diff)
Don't include resolv.h when libresolv is disabled
Change-Id: I5b216ed02452549b69847b34139613669905023c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 42194fb8b3..ed8b06a613 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -13,7 +13,10 @@
#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
-#include <resolv.h>
+
+#if QT_CONFIG(libresolv)
+# include <resolv.h>
+#endif
#ifndef _PATH_RESCONF
# define _PATH_RESCONF "/etc/resolv.conf"