From patchwork Fri Apr 15 06:40:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 610765 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 3qmSbz3xhCz9ssM for ; Fri, 15 Apr 2016 16:41:03 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b=L45OPK6a; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CAD128C26A; Fri, 15 Apr 2016 06:41:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nGQm9JM-o8Qr; Fri, 15 Apr 2016 06:41:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6FEFA8C13C; Fri, 15 Apr 2016 06:41:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 210CC1C2D48 for ; Fri, 15 Apr 2016 06:41:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1CA21267D8 for ; Fri, 15 Apr 2016 06:41:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ORXbR4tln3l0 for ; Fri, 15 Apr 2016 06:40:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by silver.osuosl.org (Postfix) with ESMTPS id 09A9030554 for ; Fri, 15 Apr 2016 06:40:58 +0000 (UTC) Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 1F6C820AB0 for ; Fri, 15 Apr 2016 08:40:55 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3qmSbp5G6jz5vND; Fri, 15 Apr 2016 08:40:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded.rocks (Postfix) with ESMTP id 9B6FCEE0C78; Fri, 15 Apr 2016 08:40:53 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:references:in-reply-to:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=default; t= 1460702438; x=1461307239; bh=bkz4P65JMmgTe4TX7L0y34C6pe06zH5KBp0 UZ/LEPbA=; b=L45OPK6avbEZG4jOBa9SETWmU+M8rXmcYTQngKJR99azpLNPtU1 bPW2Pg2KyEEwQSrD5vwKSjmpx+xUeYJoiU0iPPQHHCpt4knv5CpjHY8pbq1Ycb0J M0zNNg29ovReUdro8y8yL/pQFKsaQ62JJ6u0OCQYqrDVUOmqymj6ECX+aPQzd4yL 7RIKgEQjU+/DkA93HQoFP07amTlMZE9MkxsP6VyooOphlRFg7NIxN7/JjotAKzzY JUHpqFLZjNJU3NLskTQfjrF2hdUyoC3fRg3HSLzvnrWQenXQZbyo4K2/ITnQweAz CIUvxILX/GuKOH2Tlz/ti0K1m2WjQIJUB4Q== X-Virus-Scanned: Debian amavisd-new at mail.embedded.rocks Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id MKBahMuSt5gX; Fri, 15 Apr 2016 08:40:38 +0200 (CEST) Received: from nzxt.fritz.box (x5f72f07d.dyn.telefonica.de [95.114.240.125]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Fri, 15 Apr 2016 08:40:38 +0200 (CEST) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Fri, 15 Apr 2016 08:40:36 +0200 Message-Id: <1460702436-2666-1-git-send-email-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1460675461-24046-1-git-send-email-joerg.krause@embedded.rocks> References: <1460675461-24046-1-git-send-email-joerg.krause@embedded.rocks> MIME-Version: 1.0 Cc: Bernd Kuhls Subject: [Buildroot] [PATCH v3] qt: Fix musl build X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This helps to make sure that QT_SOCKLEN_T is defined to be 'int' only for legacy glibc < 2 and not also for other libraries which may define it as per standards but are not glibc, e.g. musl. Fixes the following build error: In file included from ../../include/QtNetwork/private/qnet_unix_p.h:1:0, from kernel/qnetworkinterface_unix.cpp:46: ../../include/QtNetwork/private/../../../src/network/socket/qnet_unix_p.h: In function 'int qt_safe_accept(int, sockaddr*, int*, int)': ../../include/QtNetwork/private/../../../src/network/socket/qnet_unix_p.h:121:76: error: invalid conversion from 'int*' to 'socklen_t* {aka unsigned int*}' [-fpermissive] Fixes: http://autobuild.buildroot.net/results/709/709d547699596d09b4601a7940677d2010adeedf/ http://autobuild.buildroot.net/results/f05/f0589e1d06404a7bd57f5734228afe45164e553d/ Backported from Qt5: https://github.com/qtproject/qtbase/commit/813f468a14fb84af43c1f8fc0a1430277358eba2 Signed-off-by: Jörg Krause --- Note: A first version for the package qt to fix the musl build was proposed by Bernd Kuhls [1]. v3: - Add note about the first version of this patch submitted by Bernd Kuhls - Fix some comments v2: - Replace proposed patch from v1 with a backported patch from Qt5 [1] http://patchwork.ozlabs.org/patch/572101/ --- ...tform-socklen_t-on-other-C-libraries-than.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch diff --git a/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch b/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch new file mode 100644 index 0000000..9b16553 --- /dev/null +++ b/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch @@ -0,0 +1,43 @@ +From 0bf90de93b9fe21df32319e27b2507154fa8a21d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 15 Apr 2016 00:37:26 +0200 +Subject: [PATCH] Fix for platform socklen_t on other C libraries than glibc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This helps to make sure that QT_SOCKLEN_T is defined to be 'int' +only when its glibc < 2 and not also for the libraries which may define +it as per standards but are not glibc, e.g. musl. + +This patch is adapted from Qt5 [1]. + +[1] +https://github.com/qtproject/qtbase/commit/813f468a14fb84af43c1f8fc0a1430277358eba2 + +Signed-off-by: Jörg Krause +--- + 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 de751dd..d4146ed 100644 +--- a/mkspecs/linux-g++/qplatformdefs.h ++++ b/mkspecs/linux-g++/qplatformdefs.h +@@ -86,10 +86,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.8.0 +