qt5-base: add implementation of '__res_state' struct to qhostinfo_unix.cpp

This commit is contained in:
Leonid Pliushch 2018-09-13 18:13:34 +03:00 committed by Yaksh Bariya
parent 91a864ecec
commit 2f1b38f58a
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
8 changed files with 103 additions and 33 deletions

View File

@ -1,6 +1,7 @@
--- ./qtbase/src/corelib/global/qsystemdetection.h 2017-06-28 15:24:29.000000000 +0530
+++ ../qsystemdetection.h 2017-07-19 19:39:39.617805768 +0530
@@ -120,9 +120,6 @@
diff -uNr qt-everywhere-src-5.11.1/qtbase/src/corelib/global/qsystemdetection.h qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/global/qsystemdetection.h
--- qt-everywhere-src-5.11.1/qtbase/src/corelib/global/qsystemdetection.h 2018-06-15 10:29:31.000000000 +0300
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/global/qsystemdetection.h 2018-09-13 18:07:43.498639468 +0300
@@ -108,9 +108,6 @@
# else
# error "Qt has not been ported to this Apple platform - see http://www.qt.io/developers"
# endif

View File

@ -1,6 +1,7 @@
--- ./qtbase/src/corelib/thread/qthread_unix.cpp 2017-06-28 15:24:29.000000000 +0530
+++ ../qthread_unix.cpp 2017-07-19 20:19:40.071681378 +0530
@@ -101,7 +101,7 @@
diff -uNr qt-everywhere-src-5.11.1/qtbase/src/corelib/thread/qthread_unix.cpp qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/thread/qthread_unix.cpp
--- qt-everywhere-src-5.11.1/qtbase/src/corelib/thread/qthread_unix.cpp 2018-06-15 10:29:31.000000000 +0300
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/thread/qthread_unix.cpp 2018-09-13 18:07:43.501972824 +0300
@@ -92,7 +92,7 @@
# define SCHED_IDLE 5
#endif
@ -9,7 +10,7 @@
#define QT_HAS_THREAD_PRIORITY_SCHEDULING
#endif
@@ -319,7 +319,7 @@
@@ -312,7 +312,7 @@
void *QThreadPrivate::start(void *arg)
{
@ -18,7 +19,7 @@
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
#endif
pthread_cleanup_push(QThreadPrivate::finish, arg);
@@ -369,7 +369,7 @@
@@ -360,7 +360,7 @@
#endif
emit thr->started(QThread::QPrivateSignal());
@ -27,7 +28,7 @@
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_testcancel();
#endif
@@ -666,7 +666,7 @@
@@ -747,7 +747,7 @@
void QThread::terminate()
{
@ -36,7 +37,7 @@
Q_D(QThread);
QMutexLocker locker(&d->mutex);
@@ -708,7 +708,7 @@
@@ -789,7 +789,7 @@
"Current thread was not started with QThread.");
Q_UNUSED(thr)

View File

@ -0,0 +1,65 @@
diff -uNr qt-everywhere-src-5.11.1/qtbase/src/network/kernel/qhostinfo_unix.cpp qt-everywhere-src-5.11.1.mod/qtbase/src/network/kernel/qhostinfo_unix.cpp
--- qt-everywhere-src-5.11.1/qtbase/src/network/kernel/qhostinfo_unix.cpp 2018-06-15 10:29:31.000000000 +0300
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/network/kernel/qhostinfo_unix.cpp 2018-09-13 18:10:03.589583706 +0300
@@ -84,6 +84,61 @@
NeedResNInit
};
+#include <sys/types.h>
+#include <linux/in.h>
+
+/* res_state: the global state used by the resolver stub. */
+#define MAXNS 3 /* max # name servers we'll track */
+#define MAXDFLSRCH 3 /* # default domain levels to try */
+#define MAXDNSRCH 6 /* max # domains in search path */
+#define MAXRESOLVSORT 10 /* number of net to sort on */
+
+struct __res_state {
+ int retrans; /* retransmition time interval */
+ int retry; /* number of times to retransmit */
+ unsigned long options; /* option flags - see below. */
+ int nscount; /* number of name servers */
+ struct sockaddr_in
+ nsaddr_list[MAXNS]; /* address of name server */
+ unsigned short id; /* current message id */
+ /* 2 byte hole here. */
+ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
+ char defdname[256]; /* default domain (deprecated) */
+ unsigned long pfcode; /* RES_PRF_ flags - see below. */
+ unsigned ndots:4; /* threshold for initial abs. query */
+ unsigned nsort:4; /* number of elements in sort_list[] */
+ unsigned ipv6_unavail:1; /* connecting to IPv6 server failed */
+ unsigned unused:23;
+ struct {
+ struct in_addr addr;
+ uint32_t mask;
+ } sort_list[MAXRESOLVSORT];
+ /* 4 byte hole here on 64-bit architectures. */
+ void * __glibc_unused_qhook;
+ void * __glibc_unused_rhook;
+ int res_h_errno; /* last one set for this context */
+ int _vcsock; /* PRIVATE: for res_send VC i/o */
+ unsigned int _flags; /* PRIVATE: see below */
+ /* 4 byte hole here on 64-bit architectures. */
+ union {
+ char pad[52]; /* On an i386 this means 512b total. */
+ struct {
+ uint16_t nscount;
+ uint16_t nsmap[MAXNS];
+ int nssocks[MAXNS];
+ uint16_t nscount6;
+ uint16_t nsinit;
+ struct sockaddr_in6 *nsaddrs[MAXNS];
+#ifdef _LIBC
+ unsigned long long int __glibc_extension_index
+ __attribute__((packed));
+#else
+ unsigned int __glibc_reserved[2];
+#endif
+ } _ext;
+ } _u;
+};
+
typedef struct __res_state *res_state_ptr;
typedef int (*res_init_proto)(void);

View File

@ -1,5 +1,6 @@
--- ./qtlocation/src/plugins/geoservices/geoservices.pro 2017-09-25 22:25:20.000000000 +0530
+++ ../geoservices.pro 2017-11-16 11:28:04.911486902 +0530
diff -uNr qt-everywhere-src-5.11.1/qtlocation/src/plugins/geoservices/geoservices.pro qt-everywhere-src-5.11.1.mod/qtlocation/src/plugins/geoservices/geoservices.pro
--- qt-everywhere-src-5.11.1/qtlocation/src/plugins/geoservices/geoservices.pro 2018-06-12 21:44:12.000000000 +0300
+++ qt-everywhere-src-5.11.1.mod/qtlocation/src/plugins/geoservices/geoservices.pro 2018-09-13 18:07:43.501972824 +0300
@@ -8,11 +8,3 @@
qtConfig(geoservices_itemsoverlay): SUBDIRS += itemsoverlay
qtConfig(geoservices_osm): SUBDIRS += osm

View File

@ -0,0 +1,11 @@
diff -uNr qt-everywhere-src-5.11.1/qtsensors/src/plugins/sensors/linux/linux.pro qt-everywhere-src-5.11.1.mod/qtsensors/src/plugins/sensors/linux/linux.pro
--- qt-everywhere-src-5.11.1/qtsensors/src/plugins/sensors/linux/linux.pro 2018-06-12 12:10:20.000000000 +0300
+++ qt-everywhere-src-5.11.1.mod/qtsensors/src/plugins/sensors/linux/linux.pro 2018-09-13 18:07:43.505306179 +0300
@@ -3,7 +3,6 @@
OTHER_FILES = plugin.json
-!android:LIBS += -lrt
HEADERS += linuxsysaccelerometer.h
SOURCES += linuxsysaccelerometer.cpp \
main.cpp

View File

@ -0,0 +1,12 @@
diff -uNr qt-everywhere-src-5.11.1/qtserialport/src/serialport/qserialport_unix.cpp qt-everywhere-src-5.11.1.mod/qtserialport/src/serialport/qserialport_unix.cpp
--- qt-everywhere-src-5.11.1/qtserialport/src/serialport/qserialport_unix.cpp 2018-06-09 14:09:14.000000000 +0300
+++ qt-everywhere-src-5.11.1.mod/qtserialport/src/serialport/qserialport_unix.cpp 2018-09-13 18:07:43.508639535 +0300
@@ -73,7 +73,7 @@
# define __ANDROID_API__ 21
# endif
-# if !defined(Q_OS_ANDROID) || (!defined(Q_PROCESSOR_X86) && __ANDROID_API__ < 21)
+# if 0
struct termios2 {
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */

View File

@ -1,10 +0,0 @@
--- ./qtsensors/src/plugins/sensors/linux/linux.pro 2017-06-23 12:02:15.000000000 +0530
+++ ../linux.pro 2017-10-01 11:18:29.309218546 +0530
@@ -3,7 +3,6 @@
OTHER_FILES = plugin.json
-!android:LIBS += -lrt
HEADERS += linuxsysaccelerometer.h
SOURCES += linuxsysaccelerometer.cpp \
main.cpp

View File

@ -1,11 +0,0 @@
--- ./qtserialport/src/serialport/qserialport_unix.cpp 2017-06-20 12:29:20.000000000 +0530
+++ ../qserialport_unix.cpp 2017-10-01 10:21:47.899850693 +0530
@@ -66,7 +66,7 @@
# define __ANDROID_API__ 21
# endif
-# if !defined(Q_OS_ANDROID) || (!defined(Q_PROCESSOR_X86) && __ANDROID_API__ < 21)
+# if 0
struct termios2 {
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */