View | Details | Raw Unified | Return to bug 269406
Collapse All | Expand All

(-)b/x11-wm/plasma5-kwin/files/patch-src_backends_drm_drm__qpainter__layer.cpp (+20 lines)
Added Link Here
1
src/backends/drm/drm_qpainter_layer.cpp:54:79: error: use of undeclared identifier 'errno'
2
        qCWarning(KWIN_DRM, "Failed to create dumb framebuffer: %s", strerror(errno));
3
                                                                              ^
4
src/backends/drm/drm_qpainter_layer.cpp:66:87: error: use of undeclared identifier 'errno'
5
                qCWarning(KWIN_DRM, "Failed to create dumb framebuffer: %s", strerror(errno));
6
                                                                                      ^
7
src/backends/drm/drm_qpainter_layer.cpp:121:94: error: use of undeclared identifier 'errno'
8
        qCWarning(KWIN_DRM, "Failed to create dumb framebuffer for the cursor: %s", strerror(errno));
9
                                                                                             ^
10
11
--- src/backends/drm/drm_qpainter_layer.cpp.orig	2023-01-03 18:08:37 UTC
12
+++ src/backends/drm/drm_qpainter_layer.cpp
13
@@ -19,6 +19,7 @@
14
 #include "drm_qpainter_backend.h"
15
 #include "drm_virtual_output.h"
16
 
17
+#include <cerrno>
18
 #include <drm_fourcc.h>
19
 
20
 namespace KWin
(-)b/x11-wm/plasma5-kwin/files/patch-src_utils_ramfile.cpp (+68 lines)
Added Link Here
1
FreeBSD < 13 lacks https://cgit.freebsd.org/src/commit/?id=af755d3e4859
2
3
src/utils/ramfile.cpp:57:117: error: use of undeclared identifier 'errno'
4
        qCWarning(KWIN_CORE).nospace() << name << ": Failed to remove temporary file from filesystem: " << strerror(errno);
5
                                                                                                                    ^
6
src/utils/ramfile.cpp:80:17: error: use of undeclared identifier 'F_SEAL_SHRINK'
7
    int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL;
8
                ^
9
src/utils/ramfile.cpp:80:33: error: use of undeclared identifier 'F_SEAL_GROW'
10
    int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL;
11
                                ^
12
src/utils/ramfile.cpp:80:47: error: use of undeclared identifier 'F_SEAL_SEAL'
13
    int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL;
14
                                              ^
15
src/utils/ramfile.cpp:82:18: error: use of undeclared identifier 'F_SEAL_WRITE'
16
        seals |= F_SEAL_WRITE;
17
                 ^
18
src/utils/ramfile.cpp:85:21: error: use of undeclared identifier 'F_ADD_SEALS'
19
    if (fcntl(fd(), F_ADD_SEALS, seals) != 0) {
20
                    ^
21
src/utils/ramfile.cpp:139:35: error: use of undeclared identifier 'F_GET_SEALS'
22
    const int seals = fcntl(fd(), F_GET_SEALS);
23
                                  ^
24
src/utils/ramfile.cpp:141:21: error: use of undeclared identifier 'F_SEAL_WRITE'
25
        if (seals & F_SEAL_WRITE) {
26
                    ^
27
28
--- src/utils/ramfile.cpp.orig	2023-01-03 18:08:37 UTC
29
+++ src/utils/ramfile.cpp
30
@@ -16,6 +16,7 @@
31
 #include <fcntl.h>
32
 #include <sys/mman.h>
33
 #include <unistd.h>
34
+#include <cerrno>
35
 #include <utility>
36
 
37
 namespace KWin
38
@@ -77,6 +78,7 @@ RamFile::RamFile(const char *name, const void *inData,
39
     m_tmp->unmap(data);
40
 #endif
41
 
42
+#ifdef F_SEAL_SEAL
43
     int seals = F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL;
44
     if (flags.testFlag(RamFile::Flag::SealWrite)) {
45
         seals |= F_SEAL_WRITE;
46
@@ -85,6 +87,7 @@ RamFile::RamFile(const char *name, const void *inData,
47
     if (fcntl(fd(), F_ADD_SEALS, seals) != 0) {
48
         qCDebug(KWIN_CORE).nospace() << name << ": Failed to seal RamFile: " << strerror(errno);
49
     }
50
+#endif
51
 
52
     guard.dismiss();
53
 }
54
@@ -136,12 +139,14 @@ RamFile::Flags RamFile::effectiveFlags() const
55
 {
56
     Flags flags = {};
57
 
58
+#ifdef F_SEAL_SEAL
59
     const int seals = fcntl(fd(), F_GET_SEALS);
60
     if (seals > 0) {
61
         if (seals & F_SEAL_WRITE) {
62
             flags.setFlag(Flag::SealWrite);
63
         }
64
     }
65
+#endif
66
 
67
     return flags;
68
 }

Return to bug 269406