aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0014-Check-glibc-version-for-renameat2-statx-on-non-boots.patch
blob: 09ec0fa9de501dddeeb2258e1538af5728b523fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From fb6a20e6917cfa32e69791e0adb130140f4b5688 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Tue, 21 Aug 2018 00:29:06 +0200
Subject: [PATCH] Check glibc version for renameat2/statx on non bootstrapped
 build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Upstream-Status: Pending

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 src/corelib/io/qfilesystemengine_unix.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 964dcebeb2..c09eb0154b 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -95,6 +95,17 @@ extern "C" NSString *NSTemporaryDirectory();
 #ifndef FICLONE
 #  define FICLONE       _IOW(0x94, 9, int)
 #endif
+
+// renameat2/statx features for non bootstrapped build
+#ifndef QT_BOOTSTRAPPED
+#ifdef __GLIBC_PREREQ
+# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+#else
+# define QT_FEATURE_renameat2 -1
+# define QT_FEATURE_statx -1
+#endif
+#endif
 #endif
 
 #if defined(Q_OS_ANDROID)