From 2f1b38f58af341f98f6b0b227180984227aae81f Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Thu, 13 Sep 2018 18:13:34 +0300 Subject: [PATCH] qt5-base: add implementation of '__res_state' struct to qhostinfo_unix.cpp --- ...c_corelib_global_qsystemdetection.h.patch} | 7 +- ...src_corelib_thread_qthread_unix.cpp.patch} | 15 +++-- ...rc_network_kernel_qhostinfo_unix.cpp.patch | 65 +++++++++++++++++++ ...plugins_geoservices_geoservices.pro.patch} | 5 +- ..._src_plugins_sensors_linux_linux.pro.patch | 11 ++++ ..._src_serialport_qserialport_unix.cpp.patch | 12 ++++ ...-src-plugins-sensors-linux-linux.pro.patch | 10 --- ...-src-serialport-qserialport_unix.cpp.patch | 11 ---- 8 files changed, 103 insertions(+), 33 deletions(-) rename x11-packages/qt5-base/{qsystemdetection.h.patch => qt-everywhere-src-5.11.1_qtbase_src_corelib_global_qsystemdetection.h.patch} (51%) rename x11-packages/qt5-base/{qthread_unix.cpp.patch => qt-everywhere-src-5.11.1_qtbase_src_corelib_thread_qthread_unix.cpp.patch} (73%) create mode 100644 x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_network_kernel_qhostinfo_unix.cpp.patch rename x11-packages/qt5-base/{qtlocation-src-plugins-geoservices-geoservices.pro.patch => qt-everywhere-src-5.11.1_qtlocation_src_plugins_geoservices_geoservices.pro.patch} (54%) create mode 100644 x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtsensors_src_plugins_sensors_linux_linux.pro.patch create mode 100644 x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtserialport_src_serialport_qserialport_unix.cpp.patch delete mode 100644 x11-packages/qt5-base/qtsensors-src-plugins-sensors-linux-linux.pro.patch delete mode 100644 x11-packages/qt5-base/qtserialport-src-serialport-qserialport_unix.cpp.patch diff --git a/x11-packages/qt5-base/qsystemdetection.h.patch b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_corelib_global_qsystemdetection.h.patch similarity index 51% rename from x11-packages/qt5-base/qsystemdetection.h.patch rename to x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_corelib_global_qsystemdetection.h.patch index 89f96ca3b..f1b039bb1 100644 --- a/x11-packages/qt5-base/qsystemdetection.h.patch +++ b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_corelib_global_qsystemdetection.h.patch @@ -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 diff --git a/x11-packages/qt5-base/qthread_unix.cpp.patch b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_corelib_thread_qthread_unix.cpp.patch similarity index 73% rename from x11-packages/qt5-base/qthread_unix.cpp.patch rename to x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_corelib_thread_qthread_unix.cpp.patch index 7ae123c47..d8e02a01c 100644 --- a/x11-packages/qt5-base/qthread_unix.cpp.patch +++ b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_corelib_thread_qthread_unix.cpp.patch @@ -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) diff --git a/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_network_kernel_qhostinfo_unix.cpp.patch b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_network_kernel_qhostinfo_unix.cpp.patch new file mode 100644 index 000000000..6f5ba555a --- /dev/null +++ b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtbase_src_network_kernel_qhostinfo_unix.cpp.patch @@ -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 ++#include ++ ++/* 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); diff --git a/x11-packages/qt5-base/qtlocation-src-plugins-geoservices-geoservices.pro.patch b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtlocation_src_plugins_geoservices_geoservices.pro.patch similarity index 54% rename from x11-packages/qt5-base/qtlocation-src-plugins-geoservices-geoservices.pro.patch rename to x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtlocation_src_plugins_geoservices_geoservices.pro.patch index 7a91869e3..f95ba7e8d 100644 --- a/x11-packages/qt5-base/qtlocation-src-plugins-geoservices-geoservices.pro.patch +++ b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtlocation_src_plugins_geoservices_geoservices.pro.patch @@ -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 diff --git a/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtsensors_src_plugins_sensors_linux_linux.pro.patch b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtsensors_src_plugins_sensors_linux_linux.pro.patch new file mode 100644 index 000000000..b4749b20d --- /dev/null +++ b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtsensors_src_plugins_sensors_linux_linux.pro.patch @@ -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 diff --git a/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtserialport_src_serialport_qserialport_unix.cpp.patch b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtserialport_src_serialport_qserialport_unix.cpp.patch new file mode 100644 index 000000000..89d681e18 --- /dev/null +++ b/x11-packages/qt5-base/qt-everywhere-src-5.11.1_qtserialport_src_serialport_qserialport_unix.cpp.patch @@ -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 */ diff --git a/x11-packages/qt5-base/qtsensors-src-plugins-sensors-linux-linux.pro.patch b/x11-packages/qt5-base/qtsensors-src-plugins-sensors-linux-linux.pro.patch deleted file mode 100644 index 71398c69e..000000000 --- a/x11-packages/qt5-base/qtsensors-src-plugins-sensors-linux-linux.pro.patch +++ /dev/null @@ -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 diff --git a/x11-packages/qt5-base/qtserialport-src-serialport-qserialport_unix.cpp.patch b/x11-packages/qt5-base/qtserialport-src-serialport-qserialport_unix.cpp.patch deleted file mode 100644 index dcd27e587..000000000 --- a/x11-packages/qt5-base/qtserialport-src-serialport-qserialport_unix.cpp.patch +++ /dev/null @@ -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 */