diff -ur qt-everywhere-opensource-src-4.8.7/configure source/configure
--- qt-everywhere-opensource-src-4.8.7/configure	2013-06-07 09:16:41.000000000 +0400
+++ source/configure	2014-03-07 11:57:58.081117323 +0400
@@ -6799,6 +6799,7 @@
 fi
 
 if [ "$CFG_STL" != "no" ]; then
+    HAVE_STL=yes
     if [ "$HAVE_STL" = "yes" ]; then
         CFG_STL=yes
     else
diff -ur qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.cpp source/src/corelib/global/qglobal.cpp
--- qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.cpp	2013-06-07 09:16:52.000000000 +0400
+++ source/src/corelib/global/qglobal.cpp	2014-03-07 11:57:58.094450656 +0400
@@ -59,7 +59,7 @@
 #include <string.h>
 
 #ifndef QT_NO_EXCEPTIONS
-#  include <string>
+//#  include <string>
 #  include <exception>
 #endif
 
diff -ur qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h source/src/corelib/global/qglobal.h
--- qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h	2013-06-07 09:16:52.000000000 +0400
+++ source/src/corelib/global/qglobal.h	2014-03-07 11:57:58.094450656 +0400
@@ -261,6 +261,8 @@
 #  define Q_OS_INTEGRITY
 #elif defined(VXWORKS) /* there is no "real" VxWorks define - this has to be set in the mkspec! */
 #  define Q_OS_VXWORKS
+#elif defined(__EMBOX__)
+#  define Q_OS_EMBOX
 #elif defined(__MAKEDEPEND__)
 #else
 #  error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
@@ -533,7 +533,7 @@
-#      define Q_COMPILER_VARIADIC_TEMPLATES
-#      define Q_COMPILER_AUTO_FUNCTION
-#      define Q_COMPILER_AUTO_TYPE
-#      define Q_COMPILER_EXTERN_TEMPLATES
-#      define Q_COMPILER_DEFAULT_DELETE_MEMBERS
-#      define Q_COMPILER_CLASS_ENUM
-#      define Q_COMPILER_INITIALIZER_LISTS
+#      //define Q_COMPILER_VARIADIC_TEMPLATES
+#      //define Q_COMPILER_AUTO_FUNCTION
+#      //define Q_COMPILER_AUTO_TYPE
+#      //define Q_COMPILER_EXTERN_TEMPLATES
+#      //define Q_COMPILER_DEFAULT_DELETE_MEMBERS
+#      //define Q_COMPILER_CLASS_ENUM
+#      //define Q_COMPILER_INITIALIZER_LISTS
@@ -2315,1 +2315,2 @@
-    Q_DECL_CONSTEXPR inline QFlags(Zero = 0) : i(0) {}
+    Q_DECL_CONSTEXPR inline QFlags(Zero = 0) : i(0) {}
+    Q_DECL_CONSTEXPR inline QFlags(int n) : i(n) {}
@@ -2327,0 +2327,2 @@
+    Q_DECL_CONSTEXPR inline QFlags operator|(int mask) const { return QFlags(Enum(i | mask)); }
+    Q_DECL_CONSTEXPR inline QFlags operator|(uint mask) const { return QFlags(Enum(i | mask)); }
diff -ur qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess.cpp source/src/corelib/io/qprocess.cpp
--- qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess.cpp	2013-06-07 09:16:52.000000000 +0400
+++ source/src/corelib/io/qprocess.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -2263,7 +2263,8 @@
   static char *qt_empty_environ[] = { 0 };
 #define environ qt_empty_environ
 #elif !defined(Q_OS_WIN)
-  extern char **environ;
+    //extern char **environ;
+	#include <unistd.h> // XXX environ
 #endif
 QT_END_INCLUDE_NAMESPACE
 
diff -ur qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess_unix.cpp source/src/corelib/io/qprocess_unix.cpp
--- qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess_unix.cpp	2013-06-07 09:16:52.000000000 +0400
+++ source/src/corelib/io/qprocess_unix.cpp	2014-03-07 12:31:10.484500716 +0400
@@ -1335,6 +1335,88 @@
     return childPid != -1;
 }
 
+#elif defined(Q_OS_EMBOX)
+
+__BEGIN_DECLS
+
+extern const struct cmd *cmd_lookup(const char *name);
+extern int cmd_exec(const struct cmd *cmd, int argc, char **argv);
+extern int new_task(const char *name, void *(*run)(void *), void *arg);
+
+__END_DECLS
+
+struct QProcessTask {
+
+    QProcessTask(const QString &program, const QStringList &arguments);
+    ~QProcessTask();
+
+    qint64 run();
+
+    int argc;
+    char **args;
+};
+
+QProcessTask::QProcessTask(const QString &program, const QStringList &arguments) {
+    QStringList argsList(arguments);
+    QFileInfo fileProgram(program);
+
+    argsList.prepend(fileProgram.baseName());
+
+    argc = argsList.size();
+    args = new char*[argc];
+
+    int i = 0;
+    foreach(QString s, argsList) {
+        int slen = s.toAscii().size();
+        args[i] = new char[slen + 1];
+        strcpy(args[i], s.toAscii().constData());
+        args[i][slen] = '\0';
+
+        i++;
+    }
+}
+
+QProcessTask::~QProcessTask() {
+
+    for (int i = 0; i < argc; i++) {
+        delete args[i];
+    }
+
+    delete args;
+}
+
+static void *QProcessTaskRun(void *arg) {
+    QProcessTask *task = arg;
+
+    const struct cmd *cmd = cmd_lookup(task->args[0]);
+
+    if (cmd) {
+        cmd_exec(cmd, task->argc, task->args);
+    }
+
+    delete task;
+
+    return NULL;
+}
+
+qint64 QProcessTask::run() {
+    return new_task("", QProcessTaskRun, this);
+}
+
+bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
+{
+    qint64 tpid;
+    QProcessTask *processTask = new QProcessTask(program, arguments);
+
+    tpid = processTask->run();
+
+    if (pid) {
+        *pid = tpid;
+    }
+
+    return true;
+}
+
 #else
 
 bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
diff -ur qt-everywhere-opensource-src-4.8.7/src/corelib/io/qresource.cpp source/src/corelib/io/qresource.cpp
--- qt-everywhere-opensource-src-4.8.7/src/corelib/io/qresource.cpp	2013-06-07 09:16:52.000000000 +0400
+++ source/src/corelib/io/qresource.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -929,8 +929,10 @@
 };
 
 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined (Q_OS_NACL) && !defined(Q_OS_INTEGRITY)
+#if !defined(Q_OS_EMBOX)
 #define QT_USE_MMAP
 #endif
+#endif
 
 // most of the headers below are already included in qplatformdefs.h
 // also this lacks Large File support but that's probably irrelevant
diff -ur qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qtranslator.cpp source/src/corelib/kernel/qtranslator.cpp
--- qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qtranslator.cpp	2013-06-07 09:16:52.000000000 +0400
+++ source/src/corelib/kernel/qtranslator.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -61,9 +61,11 @@
 #include "qresource.h"
 
 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY)
+#if !defined(Q_OS_EMBOX)
 #define QT_USE_MMAP
 #include "private/qcore_unix_p.h"
 #endif
+#endif
 
 #ifdef Q_OS_SYMBIAN
 #include "private/qcore_symbian_p.h"
diff -ur qt-everywhere-opensource-src-4.8.7/src/gui/image/qmnghandler.cpp source/src/gui/image/qmnghandler.cpp
--- qt-everywhere-opensource-src-4.8.7/src/gui/image/qmnghandler.cpp	2013-06-07 09:16:59.000000000 +0400
+++ source/src/gui/image/qmnghandler.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -98,7 +98,7 @@
         (iChunkname>>8)&0xff,
         (iChunkname>>0)&0xff,
         iExtra1,iExtra2);
-    return TRUE;
+    return MNG_TRUE;
 }
 
 static mng_ptr myalloc(mng_size_t iSize)
diff -ur qt-everywhere-opensource-src-4.8.7/src/gui/styles/qplastiquestyle.cpp source/src/gui/styles/qplastiquestyle.cpp
--- qt-everywhere-opensource-src-4.8.7/src/gui/styles/qplastiquestyle.cpp	2013-06-07 09:16:59.000000000 +0400
+++ source/src/gui/styles/qplastiquestyle.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -1513,17 +1513,21 @@
             handle.setColor(3, option->palette.light().color().rgba());
 
             if (option->state & State_Horizontal) {
-                int nchunks = cacheRect.height() / handle.height();
-                int indent = (cacheRect.height() - (nchunks * handle.height())) / 2;
-                for (int i = 0; i < nchunks; ++i)
-                    cachePainter.drawImage(QPoint(cacheRect.left() + 3, cacheRect.top() + indent + i * handle.height()),
-                                           handle);
+                if (0 < handle.height()) {
+            	    int nchunks = cacheRect.height() / handle.height();
+                    int indent = (cacheRect.height() - (nchunks * handle.height())) / 2;
+                    for (int i = 0; i < nchunks; ++i)
+                        cachePainter.drawImage(QPoint(cacheRect.left() + 3, cacheRect.top() + indent + i * handle.height()),
+                                               handle);
+                }
             } else {
-                int nchunks = cacheRect.width() / handle.width();
-                int indent = (cacheRect.width() - (nchunks * handle.width())) / 2;
-                for (int i = 0; i < nchunks; ++i)
-                    cachePainter.drawImage(QPoint(cacheRect.left() + indent + i * handle.width(), cacheRect.top() + 3),
-                                           handle);
+                if (0 < handle.width()) {
+            	    int nchunks = cacheRect.width() / handle.width();
+                    int indent = (cacheRect.width() - (nchunks * handle.width())) / 2;
+                    for (int i = 0; i < nchunks; ++i)
+                        cachePainter.drawImage(QPoint(cacheRect.left() + indent + i * handle.width(), cacheRect.top() + 3),
+                                               handle);
+                }
             }
             cachePainter.end();
             QPixmapCache::insert(pixmapName, cache);
diff -ur qt-everywhere-opensource-src-4.8.7/src/plugins/imageformats/ico/qicohandler.cpp source/src/plugins/imageformats/ico/qicohandler.cpp
--- qt-everywhere-opensource-src-4.8.7/src/plugins/imageformats/ico/qicohandler.cpp	2013-06-07 09:17:00.000000000 +0400
+++ source/src/plugins/imageformats/ico/qicohandler.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -364,11 +364,11 @@
     if (iod) {
         if (iod->seek(startpos + imageOffset)) {
             if (readBMPInfoHeader(iod, header)) {
-                return TRUE;
+                return true;
             }
         }
     }
-    return FALSE;
+    return false;
 }
 
 void ICOReader::findColorInfo(QImage & image)
diff -ur qt-everywhere-opensource-src-4.8.7/src/plugins/platforms/platforms.pro source/src/plugins/platforms/platforms.pro
--- qt-everywhere-opensource-src-4.8.7/src/plugins/platforms/platforms.pro	2013-06-07 09:17:00.000000000 +0400
+++ source/src/plugins/platforms/platforms.pro	2014-03-07 11:57:58.097783990 +0400
@@ -3,7 +3,9 @@
 SUBDIRS += minimal
 
 contains(QT_CONFIG, wayland) {
-    SUBDIRS += wayland
+	!contains(DEFINES, QT_OVERRIDE_NO_WAYLAND) {
+	    SUBDIRS += wayland
+	}
 }
 
 qnx {
--- qt-everywhere-opensource-src-4.8.7/src/network/socket/qudpsocket.cpp	2013-06-07 09:17:00.000000000 +0400
+++ source/src/network/socket/qudpsocket.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -327,1 +327,1 @@
-    return bind(QHostAddress::Any, port);
+    return bind((const QHostAddress) QHostAddress::Any, (quint16) port);
--- qt-everywhere-opensource-src-4.8.7/src/gui/styles/qcommonstyle.cpp	2013-06-07 09:17:00.000000000 +0400
+++ source/src/gui/styles/qcommonstyle.cpp	2014-03-07 11:57:58.097783990 +0400
@@ -762,1 +762,1 @@
-            QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
+            QPalette::ColorGroup cg = (widget ? widget->isEnabled() : ((bool) (vopt->state & QStyle::State_Enabled)))
@@ -775,1 +775,1 @@
-            QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
+            QPalette::ColorGroup cg = (widget ? widget->isEnabled() : ((bool) (vopt->state & QStyle::State_Enabled)))
