Kernels below version 3.17 do not support the memfd_create syscall for creating temporary anonymous files. For those kernels we have to manually create a temporary file and delete it.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- wl_tmpfile
- Build Status
Buildable 15809 Build 15809: arc lint + arc unit
Event Timeline
| intern/ghost/intern/GHOST_SystemWayland.cpp | ||
|---|---|---|
| 1807 | I don't think it is worth bothering about BSD until it is seriously considered to replace X11 for them and there is at least one distribution that makes use of Wayland by default. Further to this, I have no way (and interest) in testing this on BSD. Someone else has to provide the patches and test this on BSD with Wayland. | |
| intern/ghost/intern/GHOST_SystemWayland.cpp | ||
|---|---|---|
| 1807 | Not expecting anyone to test this on BSD soon. But I just don't see the benefit in keeping the Linux-specific code when we now have a portable alternative. | |
| intern/ghost/intern/GHOST_SystemWayland.cpp | ||
|---|---|---|
| 1807 | This mkostemp + unlink is just a workaround, not identical behaviour. From https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/4:
in memory, without any backing file on the filesystem and the race It is Linux specific API, but it was created for a reason. The HAVE_MEMFD_CREATE solution in this pull request is actually a much better (portable) solution compared to my kernel version comparison. I am going to use this one too. | |
| intern/ghost/intern/GHOST_SystemWayland.cpp | ||
|---|---|---|
| 1807 | I cannot change my comment (and I cannot preview the formatting), but this is the fixed citation from the PR that justifies the use of memfd_create:
condition which could ensue when unlink()ing it. | |
| intern/ghost/intern/GHOST_SystemWayland.cpp | ||
|---|---|---|
| 1807 | Ok, one last try:
I really don't like this Blender review system :-) | |