FreeBSD Bugzilla – Attachment 239996 Details for
Bug 269406
x11-wm/plasma5-kwin: fails on FreeBSD < 13 after Plasma 5.26 update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v1 (apply via "git am")
bug269406.diff (text/plain), 4.81 KB, created by
Jan Beich
on 2023-02-08 12:45:27 UTC
(
hide
)
Description:
v1 (apply via "git am")
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2023-02-08 12:45:27 UTC
Size:
4.81 KB
patch
obsolete
>From 8373458566501370512e9b3d5400dc632c5ce284 Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Wed, 8 Feb 2023 11:22:24 +0000 >Subject: [PATCH] x11-wm/plasma5-kwin: unbreak on FreeBSD < 13 after > d06d26f8c45e > >PR: 269406 >Approved by: ? >--- > ...-src_backends_drm_drm__qpainter__layer.cpp | 20 ++++++ > .../files/patch-src_utils_ramfile.cpp | 68 +++++++++++++++++++ > 2 files changed, 88 insertions(+) > create mode 100644 x11-wm/plasma5-kwin/files/patch-src_backends_drm_drm__qpainter__layer.cpp > create mode 100644 x11-wm/plasma5-kwin/files/patch-src_utils_ramfile.cpp > >diff --git a/x11-wm/plasma5-kwin/files/patch-src_backends_drm_drm__qpainter__layer.cpp b/x11-wm/plasma5-kwin/files/patch-src_backends_drm_drm__qpainter__layer.cpp >new file mode 100644 >index 000000000000..18ff88315524 >--- /dev/null >+++ b/x11-wm/plasma5-kwin/files/patch-src_backends_drm_drm__qpainter__layer.cpp >@@ -0,0 +1,20 @@ >+src/backends/drm/drm_qpainter_layer.cpp:54:79: error: use of undeclared identifier 'errno' >+ qCWarning(KWIN_DRM, "Failed to create dumb framebuffer: %s", strerror(errno)); >+ ^ >+src/backends/drm/drm_qpainter_layer.cpp:66:87: error: use of undeclared identifier 'errno' >+ qCWarning(KWIN_DRM, "Failed to create dumb framebuffer: %s", strerror(errno)); >+ ^ >+src/backends/drm/drm_qpainter_layer.cpp:121:94: error: use of undeclared identifier 'errno' >+ qCWarning(KWIN_DRM, "Failed to create dumb framebuffer for the cursor: %s", strerror(errno)); >+ ^ >+ >+--- src/backends/drm/drm_qpainter_layer.cpp.orig 2023-01-03 18:08:37 UTC >++++ src/backends/drm/drm_qpainter_layer.cpp >+@@ -19,6 +19,7 @@ >+ #include "drm_qpainter_backend.h" >+ #include "drm_virtual_output.h" >+ >++#include <cerrno> >+ #include <drm_fourcc.h> >+ >+ namespace KWin >diff --git a/x11-wm/plasma5-kwin/files/patch-src_utils_ramfile.cpp b/x11-wm/plasma5-kwin/files/patch-src_utils_ramfile.cpp >new file mode 100644 >index 000000000000..4de0b5f5fa4a >--- /dev/null >+++ b/x11-wm/plasma5-kwin/files/patch-src_utils_ramfile.cpp >@@ -0,0 +1,68 @@ >+FreeBSD < 13 lacks https://cgit.freebsd.org/src/commit/?id=af755d3e4859 >+ >+src/utils/ramfile.cpp:57:117: error: use of undeclared identifier 'errno' >+ qCWarning(KWIN_CORE).nospace() << name << ": Failed to remove temporary file from filesystem: " << strerror(errno); >+ ^ >+src/utils/ramfile.cpp:80:17: error: use of undeclared identifier 'F_SEAL_SHRINK' >+ int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL; >+ ^ >+src/utils/ramfile.cpp:80:33: error: use of undeclared identifier 'F_SEAL_GROW' >+ int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL; >+ ^ >+src/utils/ramfile.cpp:80:47: error: use of undeclared identifier 'F_SEAL_SEAL' >+ int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL; >+ ^ >+src/utils/ramfile.cpp:82:18: error: use of undeclared identifier 'F_SEAL_WRITE' >+ seals |= F_SEAL_WRITE; >+ ^ >+src/utils/ramfile.cpp:85:21: error: use of undeclared identifier 'F_ADD_SEALS' >+ if (fcntl(fd(), F_ADD_SEALS, seals) != 0) { >+ ^ >+src/utils/ramfile.cpp:139:35: error: use of undeclared identifier 'F_GET_SEALS' >+ const int seals = fcntl(fd(), F_GET_SEALS); >+ ^ >+src/utils/ramfile.cpp:141:21: error: use of undeclared identifier 'F_SEAL_WRITE' >+ if (seals & F_SEAL_WRITE) { >+ ^ >+ >+--- src/utils/ramfile.cpp.orig 2023-01-03 18:08:37 UTC >++++ src/utils/ramfile.cpp >+@@ -16,6 +16,7 @@ >+ #include <fcntl.h> >+ #include <sys/mman.h> >+ #include <unistd.h> >++#include <cerrno> >+ #include <utility> >+ >+ namespace KWin >+@@ -77,6 +78,7 @@ RamFile::RamFile(const char *name, const void *inData, >+ m_tmp->unmap(data); >+ #endif >+ >++#ifdef F_SEAL_SEAL >+ int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL; >+ if (flags.testFlag(RamFile::Flag::SealWrite)) { >+ seals |= F_SEAL_WRITE; >+@@ -85,6 +87,7 @@ RamFile::RamFile(const char *name, const void *inData, >+ if (fcntl(fd(), F_ADD_SEALS, seals) != 0) { >+ qCDebug(KWIN_CORE).nospace() << name << ": Failed to seal RamFile: " << strerror(errno); >+ } >++#endif >+ >+ guard.dismiss(); >+ } >+@@ -136,12 +139,14 @@ RamFile::Flags RamFile::effectiveFlags() const >+ { >+ Flags flags = {}; >+ >++#ifdef F_SEAL_SEAL >+ const int seals = fcntl(fd(), F_GET_SEALS); >+ if (seals > 0) { >+ if (seals & F_SEAL_WRITE) { >+ flags.setFlag(Flag::SealWrite); >+ } >+ } >++#endif >+ >+ return flags; >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 269406
: 239996