From 0a26cbb46b3f4efd82ece41262aff1011eadf645 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 24 Feb 2023 09:07:40 +0400 Subject: Fix build on CentOS 7 Have the following errors while attempting to build qtwayland v6.5.0-beta3: /usr/src/Libraries/qt_6.5.0/qtwayland/src/client/qwaylandshmbackingstore.cpp:48:19: error: 'F_ADD_SEALS' was not declared in this scope 48 | fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); | ^~~~~~~~~~~ /usr/src/Libraries/qt_6.5.0/qtwayland/src/client/qwaylandshmbackingstore.cpp:48:32: error: 'F_SEAL_SHRINK' was not declared in this scope 48 | fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); | ^~~~~~~~~~~~~ /usr/src/Libraries/qt_6.5.0/qtwayland/src/client/qwaylandshmbackingstore.cpp:48:48: error: 'F_SEAL_SEAL' was not declared in this scope 48 | fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); | ^~~~~~~~~~~ Change-Id: I4b9b3a13ac47483594f454ba36dc5d720cb592a5 Reviewed-by: Vlad Zahorodnii Reviewed-by: David Edmundson (cherry picked from commit 12da86346954f7290e3e1fb00f5c5f2307d2fd58) Reviewed-by: Qt Cherry-pick Bot --- src/client/qwaylandshmbackingstore.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp index 2e0c2491..b9bfc9c8 100644 --- a/src/client/qwaylandshmbackingstore.cpp +++ b/src/client/qwaylandshmbackingstore.cpp @@ -29,6 +29,16 @@ # ifndef MFD_ALLOW_SEALING # define MFD_ALLOW_SEALING 0x0002U # endif +// from bits/fcntl-linux.h +# ifndef F_ADD_SEALS +# define F_ADD_SEALS 1033 +# endif +# ifndef F_SEAL_SEAL +# define F_SEAL_SEAL 0x0001 +# endif +# ifndef F_SEAL_SHRINK +# define F_SEAL_SHRINK 0x0002 +# endif #endif QT_BEGIN_NAMESPACE -- cgit v1.2.1