[oe] [meta-qt4][PATCH] qtbase: fix build with musl
Nicola Lunghi
nick83ola at gmail.com
Fri Aug 2 13:38:08 UTC 2019
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 at 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 at 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 at theqtcompany.com>
+Reviewed-by: Thiago Macieira <thiago.macieira at 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
More information about the Openembedded-devel
mailing list