From 4a4e9e4a9c56f9b27f2fb76fae6ff06b9f470895 Mon Sep 17 00:00:00 2001 From: Qt4iOS Date: Sat, 24 Mar 2012 14:09:04 +0000 Subject: [PATCH] Add support for iOS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provide support for platforms with older implementations of realpath() (eg. iOS). Change-Id: Iec7f73c8014d238ae6a2cb2fa836b36b89ce4ef6 Reviewed-by: Oswald Buddenhagen Reviewed-by: Morten Johan Sørvig --- src/corelib/io/qfilesystemengine_unix.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 00e116b58f..6dca129545 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -192,7 +192,12 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, } } # else +# if _POSIX_VERSION >= 200801L ret = realpath(entry.nativeFilePath().constData(), (char*)0); +# else + ret = (char*)malloc(PATH_MAX); + realpath(entry.nativeFilePath().constData(), (char*)ret); +# endif # endif if (ret) { data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute;