summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/qt-5-renameat2.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-12-03 08:52:17 +0100
committerLudovic Courtès <ludo@gnu.org>2018-12-03 08:52:17 +0100
commit194451347dc60092132d06b84a83c5205d79299a (patch)
tree828475b685c349cdd7b74c09beb7336d38bdf6f0 /gnu/packages/patches/qt-5-renameat2.patch
parent37c6f11f8dfa1880db86a3510c9e50990304d76c (diff)
parent8cddb0d6363d13f74de5409ef29b7913228f49b9 (diff)
Merge branch 'core-updates'
Diffstat (limited to 'gnu/packages/patches/qt-5-renameat2.patch')
-rw-r--r--gnu/packages/patches/qt-5-renameat2.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/patches/qt-5-renameat2.patch b/gnu/packages/patches/qt-5-renameat2.patch
new file mode 100644
index 0000000000..036070c7ff
--- /dev/null
+++ b/gnu/packages/patches/qt-5-renameat2.patch
@@ -0,0 +1,35 @@
+Avoid conflicting declaration of 'renameat2' on glibc 2.28
+(see <https://github.com/meta-qt5/meta-qt5/issues/94>.)
+
+Patch from <https://github.com/meta-qt5/meta-qt5/pull/95>
+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 be6ce48d0cb..1bf1bebc7f1 100644
+--- a/qtbase/src/corelib/io/qfilesystemengine_unix.cpp
++++ b/qtbase/src/corelib/io/qfilesystemengine_unix.cpp
+@@ -98,6 +98,17 @@ extern "C" NSString *NSTemporaryDirectory();
+ # 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
++
+ # if defined(Q_OS_ANDROID)
+ // renameat2() and statx() are disabled on Android because quite a few systems
+ // come with sandboxes that kill applications that make system calls outside a
+--
+2.14.4
+