mirror of
https://git.freebsd.org/ports.git
synced 2025-05-29 09:26:27 -04:00
On 13+, the memfd_create() syscall can create anonymous shared- memory areas that behaves like a file. This is used upstream (not in Qt, but in KDE) when possible. Use it when relevant, since it avoids creating temporary files. While here, freshen-up the other patches. PR: 259035
11 lines
442 B
C++
11 lines
442 B
C++
--- src/client/qwaylandshmbackingstore.cpp.orig 2022-06-20 20:17:21 UTC
|
|
+++ src/client/qwaylandshmbackingstore.cpp
|
|
@@ -76,6 +76,8 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *
|
|
|
|
#ifdef SYS_memfd_create
|
|
fd = syscall(SYS_memfd_create, "wayland-shm", MFD_CLOEXEC);
|
|
+#elif defined(__FreeBSD__) && __FreeBSD_version >= 1300048
|
|
+ fd = memfd_create("wayland-shm", MFD_CLOEXEC);
|
|
#endif
|
|
|
|
QScopedPointer<QFile> filePointer;
|