From 490b24b06408e90e9684d8331fd3fe8b0c51b0b5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 1 Nov 2017 08:40:24 -0700 Subject: 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 Reviewed-by: Lars Knoll --- src/corelib/global/qconfig-bootstrapped.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/corelib/global/qconfig-bootstrapped.h') diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index 2164d7f21f..dabb715607 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -87,6 +87,11 @@ #define QT_FEATURE_futimens -1 #define QT_FEATURE_futimes -1 #define QT_FEATURE_library -1 +#ifdef __linux__ +# define QT_FEATURE_linkat 1 +#else +# define QT_FEATURE_linkat -1 +#endif #define QT_NO_QOBJECT #define QT_FEATURE_process -1 #define QT_FEATURE_renameat2 -1 -- cgit v1.2.3