[oe,meta-qt5,2/3] qtvirtualkeyboard: Include sys/time.h

Message ID 20170713074154.10606-2-raj.khem@gmail.com
State New
Headers show
Series
  • [oe,meta-qt5,1/3] qtwebengine: Fix build on musl
Related show

Commit Message

Khem Raj July 13, 2017, 7:41 a.m.
Fixes build on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../0001-include-sys-time.h-for-timeval.patch      | 28 ++++++++++++++++++++++
 recipes-qt/qt5/qtvirtualkeyboard_git.bb            |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 recipes-qt/qt5/qtvirtualkeyboard/0001-include-sys-time.h-for-timeval.patch

-- 
2.13.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/recipes-qt/qt5/qtvirtualkeyboard/0001-include-sys-time.h-for-timeval.patch b/recipes-qt/qt5/qtvirtualkeyboard/0001-include-sys-time.h-for-timeval.patch
new file mode 100644
index 0000000..8518ae9
--- /dev/null
+++ b/recipes-qt/qt5/qtvirtualkeyboard/0001-include-sys-time.h-for-timeval.patch
@@ -0,0 +1,28 @@ 
+From 78106c5b939cc7d84710fe4c8e2a356ac1f110ef Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 12 Jul 2017 23:59:52 -0700
+Subject: [PATCH] include sys/time.h for timeval
+
+Musl exposes this issue since its not indirectly
+including sys/time.h like glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/virtualkeyboard/3rdparty/pinyin/include/userdict.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/virtualkeyboard/3rdparty/pinyin/include/userdict.h b/src/virtualkeyboard/3rdparty/pinyin/include/userdict.h
+index 1b9673f..924be7b 100644
+--- a/src/virtualkeyboard/3rdparty/pinyin/include/userdict.h
++++ b/src/virtualkeyboard/3rdparty/pinyin/include/userdict.h
+@@ -24,6 +24,7 @@
+ // Debug performance for operations
+ // #define ___DEBUG_PERF___
+ 
++#include <sys/time.h>
+ #ifdef _WIN32
+ #include <winsock.h> // timeval
+ #else
+-- 
+2.13.2
+
diff --git a/recipes-qt/qt5/qtvirtualkeyboard_git.bb b/recipes-qt/qt5/qtvirtualkeyboard_git.bb
index 08914b1..244e529 100644
--- a/recipes-qt/qt5/qtvirtualkeyboard_git.bb
+++ b/recipes-qt/qt5/qtvirtualkeyboard_git.bb
@@ -5,6 +5,7 @@  LICENSE = "GPL-3.0 | The-Qt-Company-Commercial"
 LIC_FILES_CHKSUM = " \
     file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
 "
+SRC_URI += "file://0001-include-sys-time.h-for-timeval.patch"
 
 # To enabled Nuance T9 Write support, you need to provide the licensed components
 # and enable "t9write" in PACKAGECONFIG. This can be done in a separate .bbappend file.