uClibc doesn't support the <realpath>-function properly which results in immediate segmentation faults when passing NULL as argument (as qt does). This patch - which adds checks before calling <realpath> - went upstream in qt4.7 and therewith is not needed anymore.

git-svn-id: svn://svn.openwrt.org/openwrt/packages@21875 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mirko 2010-06-22 10:04:32 +00:00
parent 6b713d9fda
commit 1f8c4e5f53

View File

@ -1,16 +0,0 @@
diff -aurp -x '*.o' qt-everywhere-opensource-src-4.6.2-old/src/corelib/io/qfsfileengine.cpp qt-everywhere-opensource-src-4.6.2/src/corelib/io/qfsfileengine.cpp
--- qt-everywhere-opensource-src-4.6.2-old/src/corelib/io/qfsfileengine.cpp 2010-02-11 16:55:23.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/corelib/io/qfsfileengine.cpp 2010-02-19 14:57:06.000000000 +0100
@@ -145,10 +145,9 @@ QString QFSFileEnginePrivate::canonicali
#endif
// Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here.
#if defined(Q_OS_LINUX) || defined(Q_OS_SYMBIAN)
- char *ret = realpath(path.toLocal8Bit().constData(), (char*)0);
- if (ret) {
+ char ret[PATH_MAX];
+ if (realpath(path.toLocal8Bit().constData(), ret)) {
QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret));
- free(ret);
return canonicalPath;
}
#endif