diff options
author | Niels Weber <niels.2.weber@nokia.com> | 2012-06-04 14:40:43 +0200 |
---|---|---|
committer | Niels Weber <niels.2.weber@nokia.com> | 2012-06-05 09:56:20 +0200 |
commit | 7031ecfa809de256168b4dd92bf0e7125947ba6c (patch) | |
tree | 3912b6a51f4dd70718c5bd1ce62abaf07f08a1b1 /src/libs/kdtools | |
parent | ef8f5811e505eda57e83a46bc7d7b9b120c9fad8 (diff) |
Include unistd.h where needed on Linux
This allows compiling with gcc 4.7.
For more information see: http://gcc.gnu.org/gcc-4.7/porting_to.html
Change-Id: I1b3b62fad3c44bdeb701d961297519a2057bf76e
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'src/libs/kdtools')
-rw-r--r-- | src/libs/kdtools/kdlockfile_unix.cpp | 2 | ||||
-rw-r--r-- | src/libs/kdtools/kdsavefile.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/kdtools/kdlockfile_unix.cpp b/src/libs/kdtools/kdlockfile_unix.cpp index c40eb3b7d..6f362b974 100644 --- a/src/libs/kdtools/kdlockfile_unix.cpp +++ b/src/libs/kdtools/kdlockfile_unix.cpp @@ -28,6 +28,8 @@ #include <sys/file.h> +#include <unistd.h> + KDLockFile::Private::~Private() { unlock(); diff --git a/src/libs/kdtools/kdsavefile.cpp b/src/libs/kdtools/kdsavefile.cpp index d866968cf..94ed1aa36 100644 --- a/src/libs/kdtools/kdsavefile.cpp +++ b/src/libs/kdtools/kdsavefile.cpp @@ -34,6 +34,9 @@ #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> +#ifdef Q_OS_LINUX +#include <unistd.h> +#endif static int permissionsToMode(QFile::Permissions p, bool *ok) { |