summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qdnslookup_unix.cpp
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2016-05-31 12:14:24 +0200
committerRalf Nolden <nolden@kde.org>2016-06-01 10:35:54 +0000
commit9dd58c6239a28a558e110309beb86d6ea3f2dec2 (patch)
treecdf166335fb131b1ed8f1096f6505c6885732fff /src/network/kernel/qdnslookup_unix.cpp
parentd96057328aae28a27a46492a310d9a05e250631c (diff)
Compile fix: OpenBSD does not have <arpa/nameser_compat.h>
Fix compiling under OpenBSD by using Q_OS_OPENBSD define for missing include file and adding required typedef. Obtained from OpenBSD ports patches for qt-5.5.1 at http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/x11/qt5/patches/ Change-Id: Ide223bffb6b116e8341d0eb39329af4d7a0be6a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/kernel/qdnslookup_unix.cpp')
-rw-r--r--src/network/kernel/qdnslookup_unix.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
index cb3bdfe8ff..584f0b0f0e 100644
--- a/src/network/kernel/qdnslookup_unix.cpp
+++ b/src/network/kernel/qdnslookup_unix.cpp
@@ -40,7 +40,9 @@
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
-#include <arpa/nameser_compat.h>
+#if !defined(Q_OS_OPENBSD)
+# include <arpa/nameser_compat.h>
+#endif
#include <resolv.h>
#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
@@ -51,6 +53,9 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_LIBRARY
+#if defined(Q_OS_OPENBSD)
+typedef struct __res_state* res_state;
+#endif
typedef int (*dn_expand_proto)(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
static dn_expand_proto local_dn_expand = 0;
typedef void (*res_nclose_proto)(res_state);