diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-01 08:40:24 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-11 08:12:11 +0000 |
commit | 490b24b06408e90e9684d8331fd3fe8b0c51b0b5 (patch) | |
tree | d414b68f200e7a97ee61e74332e21988b6db2670 /src/corelib/io | |
parent | 28c1e17aef520abfa051c7d9a9fe0f45ec6a5db8 (diff) |
QTemporaryFile: hide the O_TMPFILE feature behind a check for linkat()
Some Linux libc (I'm looking at you, Bionic) use the system call but
don't expose it to userspace. We could use syscall() to make the system
call, but instead I decided to penalize users of those libc by not
having the feature.
It's probably a good thing, since there were likely to be more problems
with Android anyway and I don't have an environment to debug.
Task-number: QTBUG-64154
Change-Id: I57a1bd6e0c194530b732fffd14f3007a1062d935
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qtemporaryfile_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h index 46a0d7aba3..f74e5680b9 100644 --- a/src/corelib/io/qtemporaryfile_p.h +++ b/src/corelib/io/qtemporaryfile_p.h @@ -58,7 +58,7 @@ #include "private/qfile_p.h" #include "qtemporaryfile.h" -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && QT_CONFIG(linkat) # include <fcntl.h> # ifdef O_TMPFILE // some early libc support had the wrong values for O_TMPFILE |