[vlc-commits] contrib: qt: fixed FTBFS on glibc 2.28.
Konstantin Pavlov
git at videolan.org
Tue Dec 18 21:53:17 CET 2018
vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Tue Dec 18 22:42:16 2018 +0300| [19baedd08eb0015597ef43cb2d04d280998f5f15] | committer: Konstantin Pavlov
contrib: qt: fixed FTBFS on glibc 2.28.
This is backported from the upstream 5.11.2 and can be dropped once we
bump Qt version.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=19baedd08eb0015597ef43cb2d04d280998f5f15
---
contrib/src/qt/fix-glibc-2.28-build.patch | 49 +++++++++++++++++++++++++++++++
contrib/src/qt/rules.mak | 1 +
2 files changed, 50 insertions(+)
diff --git a/contrib/src/qt/fix-glibc-2.28-build.patch b/contrib/src/qt/fix-glibc-2.28-build.patch
new file mode 100644
index 0000000000..2c0653d7f9
--- /dev/null
+++ b/contrib/src/qt/fix-glibc-2.28-build.patch
@@ -0,0 +1,49 @@
+Description: Fix qmake build with glibc 2.28
+ We haven't yet run the configure checks to see if statx and renameat2
+ are present in glibc, so this fails when we redefine the structures and
+ functions.
+Author: Thiago Macieira <thiago.macieira at intel.com>
+Origin: upstream
+Applied-Upstream: commit:25feee4
+Last-Update: 2018-08-25
+--- a/src/corelib/global/qconfig-bootstrapped.h
++++ b/src/corelib/global/qconfig-bootstrapped.h
+@@ -98,10 +98,18 @@
+ #define QT_NO_QOBJECT
+ #define QT_FEATURE_process -1
+ #define QT_FEATURE_regularexpression -1
+-#define QT_FEATURE_renameat2 -1
++#ifdef __GLIBC_PREREQ
++# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1)
++#else
++# define QT_FEATURE_renameat2 -1
++#endif
+ #define QT_FEATURE_sharedmemory -1
+ #define QT_FEATURE_slog2 -1
+-#define QT_FEATURE_statx -1
++#ifdef __GLIBC_PREREQ
++# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1)
++#else
++# define QT_FEATURE_statx -1
++#endif
+ #define QT_FEATURE_syslog -1
+ #define QT_NO_SYSTEMLOCALE
+ #define QT_FEATURE_systemsemaphore -1
+--- a/src/corelib/io/qfilesystemengine_unix.cpp
++++ b/src/corelib/io/qfilesystemengine_unix.cpp
+@@ -91,7 +91,6 @@ extern "C" NSString *NSTemporaryDirector
+ # include <sys/syscall.h>
+ # include <sys/sendfile.h>
+ # include <linux/fs.h>
+-# include <linux/stat.h>
+
+ // in case linux/fs.h is too old and doesn't define it:
+ #ifndef FICLONE
+@@ -112,6 +111,7 @@ static int renameat2(int oldfd, const ch
+ # endif
+
+ # if !QT_CONFIG(statx) && defined(SYS_statx)
++# include <linux/stat.h>
+ static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
+ { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); }
+ # elif !QT_CONFIG(statx) && !defined(SYS_statx)
diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index 003b682724..8a50a7ad2e 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -33,6 +33,7 @@ ifdef HAVE_WIN32
ifndef HAVE_WIN64
$(APPLY) $(SRC)/qt/0001-disable-qt_random_cpu.patch
endif
+ $(APPLY) $(SRC)/qt/fix-glibc-2.28-build.patch
ifndef HAVE_CROSS_COMPILE
cd qt-$(QT_VERSION_FULL); for i in QtFontDatabaseSupport QtWindowsUIAutomationSupport QtEventDispatcherSupport QtCore; do \
sed -i -e 's,"../../../../../src,"../src,g' include/$$i/$(QT_VERSION)/$$i/private/*.h; done
More information about the vlc-commits
mailing list