diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-09-15 17:51:51 +0200 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-09-15 19:17:12 +0000 |
commit | f97b718b4c7200b815026c03efc1074fd69912d4 (patch) | |
tree | e1629676ec7d0727ef0e8888f9f2cd228a0460a9 /meson.build | |
parent | 7f10f8a93ef3cac84ab6be1e46fadbe1896af490 (diff) | |
download | gstreamer-plugins-bad-f97b718b4c7200b815026c03efc1074fd69912d4.tar.gz |
waylandsink: Use memfd_create() when available
This (so-far) Linux- and FreeBSD-only API lets users create file
descriptors purely in memory, without any backing file on the filesystem
and the race condition which could ensue when unlink()ing it.
It also allows seals to be placed on the file, ensuring to every other
process that we won’t be allowed to shrink the contents, potentially
causing a SIGBUS when they try reading it.
This patch is best viewed with the -w option of git log -p.
It is an almost exact copy of Wayland commit
6908c8c85a2e33e5654f64a55cd4f847bf385cae, see
https://gitlab.freedesktop.org/wayland/wayland/merge_requests/4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1577>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build index d0d1a3fc3..631ad475b 100644 --- a/meson.build +++ b/meson.build @@ -158,6 +158,7 @@ check_functions = [ ['HAVE_DCGETTEXT', 'dcgettext'], ['HAVE_GETPAGESIZE', 'getpagesize'], ['HAVE_GMTIME_R', 'gmtime_r'], + ['HAVE_MEMFD_CREATE', 'memfd_create'], ['HAVE_MMAP', 'mmap'], ['HAVE_PIPE2', 'pipe2'], ['HAVE_GETRUSAGE', 'getrusage', '#include<sys/resource.h>'], |