All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Lunghi <nick83ola@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-qt4][PATCH] qtbase: fix build with musl
Date: Fri,  2 Aug 2019 14:38:08 +0100	[thread overview]
Message-ID: <20190802133808.38181-1-nick83ola@gmail.com> (raw)

This helps to make sure that QT_SOCKLEN_T is defined to be int
only on glibc < 2 and not also for the libraries that follow the standard
f.ex. musl

see here https://patchwork.openembedded.org/patch/94947/
for the corresponding patch in meta-qt5

Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
---
 recipes-qt4/qt4/qt4-4.8.7.inc                 |  1 +
 ...-socklen_t-on-other-C-libraries-than.patch | 41 +++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 recipes-qt4/qt4/qt4-4.8.7/0038-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch

diff --git a/recipes-qt4/qt4/qt4-4.8.7.inc b/recipes-qt4/qt4/qt4-4.8.7.inc
index d8b178f..1299493 100644
--- a/recipes-qt4/qt4/qt4-4.8.7.inc
+++ b/recipes-qt4/qt4/qt4-4.8.7.inc
@@ -36,6 +36,7 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
            file://linux.conf \
            file://fix-for-mips-n32.patch \
 	   file://qt-everywhere-opensource-src-4.8.6-QTBUG-22829.patch \
+           file://0038-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch \
            "
 
 SRC_URI[md5sum] = "d990ee66bf7ab0c785589776f35ba6ad"
diff --git a/recipes-qt4/qt4/qt4-4.8.7/0038-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch b/recipes-qt4/qt4/qt4-4.8.7/0038-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
new file mode 100644
index 0000000..7a7a33e
--- /dev/null
+++ b/recipes-qt4/qt4/qt4-4.8.7/0038-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
@@ -0,0 +1,41 @@
+From dad69257345d5259c36d87e83fa526a2634116c5 Mon Sep 17 00:00:00 2001
+From: Dave Flogeras <dflogeras2@gmail.com>
+Date: Tue, 29 Sep 2015 08:52:31 -0300
+Subject: [PATCH 1/2] 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.buddenhagen@theqtcompany.com>
+Reviewed-by: Thiago Macieira <thiago.macieira@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 de751ddf..d4146ed2 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.20.1
+
-- 
2.20.1



             reply	other threads:[~2019-08-02 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 13:38 Nicola Lunghi [this message]
2019-08-02 18:45 ` [meta-qt4][PATCH] qtbase: fix build with musl Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190802133808.38181-1-nick83ola@gmail.com \
    --to=nick83ola@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.