commit:     9b7fa0e214e6c3dc33bfd41139a87dfcf0574c8f
Author:     Dave Flogeras <dflogeras2 <AT> gmail <DOT> com>
AuthorDate: Tue Sep 29 13:20:29 2015 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Thu Oct  1 01:59:39 2015 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=9b7fa0e2

dev-qt/qtnetwork: fix build on non-glibc systems (musl/uclibc)

This patch has been accepted by upstream for the 5.6 branch, but won't
be backported. See qtbase commit 813f468a14fb84af43c1f8fc0a1430277358eba2.

Gentoo-Bug: 554556

 .../qtnetwork/files/qtnetwork-5.5-socklen_t.patch  | 40 ++++++++++++++++++++++
 dev-qt/qtnetwork/qtnetwork-5.5.0.ebuild            |  4 +++
 dev-qt/qtnetwork/qtnetwork-5.5.9999.ebuild         |  4 +++
 3 files changed, 48 insertions(+)

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.5-socklen_t.patch 
b/dev-qt/qtnetwork/files/qtnetwork-5.5-socklen_t.patch
new file mode 100644
index 0000000..dd8c335
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.5-socklen_t.patch
@@ -0,0 +1,40 @@
+From 813f468a14fb84af43c1f8fc0a1430277358eba2 Mon Sep 17 00:00:00 2001
+From: Dave Flogeras <dfloger...@gmail.com>
+Date: Tue, 29 Sep 2015 08:52:31 -0300
+Subject: [PATCH] Fix for platform socklen_t on other C libraries than glibc.
+
+Rather than treating >=glibc-2 specially, we treat <glibc-2 specially
+and all other libc implementations as POSIX.
+
+This was found here http://patchwork.openembedded.org/patch/94947/ and
+tested with armv6j-hardfloat-linux-uclibceabi and
+armv6j-hardfloat-linux-musleabi.
+
+Change-Id: I3850b1561a2e240f6564afedd80ce39407cc50b6
+Reviewed-by: Oswald Buddenhagen <oswald.buddenha...@theqtcompany.com>
+Reviewed-by: Thiago Macieira <thiago.macie...@intel.com>
+---
+ mkspecs/linux-g++/qplatformdefs.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mkspecs/linux-g++/qplatformdefs.h 
b/mkspecs/linux-g++/qplatformdefs.h
+index 5c18632..95a5758 100644
+--- a/mkspecs/linux-g++/qplatformdefs.h
++++ b/mkspecs/linux-g++/qplatformdefs.h
+@@ -78,10 +78,10 @@
+ 
+ #undef QT_SOCKLEN_T
+ 
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+-#define QT_SOCKLEN_T            socklen_t
+-#else
++#if defined(__GLIBC__) && (__GLIBC__ < 2)
+ #define QT_SOCKLEN_T            int
++#else
++#define QT_SOCKLEN_T            socklen_t
+ #endif
+ 
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+-- 
+2.6.0
+

diff --git a/dev-qt/qtnetwork/qtnetwork-5.5.0.ebuild 
b/dev-qt/qtnetwork/qtnetwork-5.5.0.ebuild
index 934c523..5be50a5 100644
--- a/dev-qt/qtnetwork/qtnetwork-5.5.0.ebuild
+++ b/dev-qt/qtnetwork/qtnetwork-5.5.0.ebuild
@@ -27,6 +27,10 @@ RDEPEND="${DEPEND}
        networkmanager? ( net-misc/networkmanager )
 "
 
+PATCHES=(
+       "${FILESDIR}/${PN}-5.5-socklen_t.patch" # bug 554556
+)
+
 QT5_TARGET_SUBDIRS=(
        src/network
        src/plugins/bearer/generic

diff --git a/dev-qt/qtnetwork/qtnetwork-5.5.9999.ebuild 
b/dev-qt/qtnetwork/qtnetwork-5.5.9999.ebuild
index 934c523..5be50a5 100644
--- a/dev-qt/qtnetwork/qtnetwork-5.5.9999.ebuild
+++ b/dev-qt/qtnetwork/qtnetwork-5.5.9999.ebuild
@@ -27,6 +27,10 @@ RDEPEND="${DEPEND}
        networkmanager? ( net-misc/networkmanager )
 "
 
+PATCHES=(
+       "${FILESDIR}/${PN}-5.5-socklen_t.patch" # bug 554556
+)
+
 QT5_TARGET_SUBDIRS=(
        src/network
        src/plugins/bearer/generic

Reply via email to