aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0019-Avoid-renameeat2-for-native-sdk-builds.patch
blob: b3c2c7678569c53ef15e695a799d218da16f14cf (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 0c79a6761e75441f433fd397bc3b79e78b6c5ef8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 14 Apr 2019 13:27:58 +0200
Subject: [PATCH] Avoid renameeat2 for native(sdk) builds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Recently pseudo changed to not support reanameeat2 as glibc wrapper [1]. This
causes massive failures at do_install [2] on qtbase.

To work around tell Qt build configuration not to use ranameet2 independent
of glibc version.

[1] https://git.openembedded.org/openembedded-core/commit/?id=0fb257121b68f38b40c078150db8f7d0979b7ea5
[2] https://github.com/meta-qt5/meta-qt5/issues/187

Upstream-Status: Inappropriate [OE-specific]

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 src/corelib/global/qconfig-bootstrapped.h |  4 ++--
 src/corelib/io/qfilesystemengine_unix.cpp | 10 ----------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index dfcc3c9c7f..30166fe41c 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -100,14 +100,14 @@
 #define QT_FEATURE_process -1
 #define QT_FEATURE_regularexpression -1
 #ifdef __GLIBC_PREREQ
-# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+# define QT_FEATURE_renameat2 -1
 #else
 # define QT_FEATURE_renameat2 -1
 #endif
 #define QT_FEATURE_sharedmemory -1
 #define QT_FEATURE_slog2 -1
 #ifdef __GLIBC_PREREQ
-# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1)
+# define QT_FEATURE_statx -1
 #else
 # define QT_FEATURE_statx -1
 #endif
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index b2d81066db..d1783ebdf3 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -1248,16 +1248,6 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy
     if (Q_UNLIKELY(srcPath.isEmpty() || tgtPath.isEmpty()))
         return emptyFileEntryWarning(), false;
 
-#if defined(RENAME_NOREPLACE) && QT_CONFIG(renameat2)
-    if (renameat2(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_NOREPLACE) == 0)
-        return true;
-
-    // We can also get EINVAL for some non-local filesystems.
-    if (errno != EINVAL) {
-        error = QSystemError(errno, QSystemError::StandardLibraryError);
-        return false;
-    }
-#endif
 #if defined(Q_OS_DARWIN) && defined(RENAME_EXCL)
     if (renameatx_np(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_EXCL) == 0)
         return true;