- don't do host lookups in separate threads to avoid inconsistent Qt socket states

diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -54,6 +54,10 @@
 #  include <unistd.h>
 #endif
 
+#ifdef Q_OS_GENODE
+#define QT_NO_THREAD 1
+#endif
+
 QT_BEGIN_NAMESPACE
 
 #ifndef QT_NO_THREAD
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -61,6 +61,7 @@
 #include "QtCore/qobject.h"
 #include "QtCore/qpointer.h"
 
+#ifndef Q_OS_GENODE
 #ifndef QT_NO_THREAD
 #include "QtCore/qthread.h"
 #include "QtCore/qthreadpool.h"
@@ -71,6 +72,7 @@
 #include <QTime>
 #include <QCache>
 #endif
+#endif /* Q_OS_GENODE */
 
 QT_BEGIN_NAMESPACE
 
@@ -112,6 +114,7 @@
     int lookupId;
 };
 
+#ifndef Q_OS_GENODE
 #ifndef QT_NO_THREAD
 // These functions are outside of the QHostInfo class and strictly internal.
 // Do NOT use them outside of QAbstractSocket.
@@ -193,6 +196,7 @@
 };
 
 #endif
+#endif /* Q_OS_GENODE */
 
 QT_END_NAMESPACE
 
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1380,6 +1380,7 @@
 #endif
     } else {
         if (d->threadData->eventDispatcher) {
+#ifndef Q_OS_GENODE
             // this internal API for QHostInfo either immediately gives us the desired
             // QHostInfo from cache or later calls the _q_startConnecting slot.
             bool immediateResultValid = false;
@@ -1392,6 +1393,9 @@
                 d->hostLookupId = -1;
                 d->_q_startConnecting(hostInfo);
             }
+#else
+            d->hostLookupId = QHostInfo::lookupHost(hostName, this, SLOT(_q_startConnecting(QHostInfo)));
+#endif
         }
     }
 
