diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2019-10-17 13:03:14 +0200 |
---|---|---|
committer | wm4 <1387750+wm4@users.noreply.github.com> | 2019-10-17 19:38:04 +0200 |
commit | a6000d3114214cf697d628ad09c8ca226c31340d (patch) | |
tree | 2890a0c1a3c4a1122ac92c00e5acf52a72e4c0d6 /wscript | |
parent | 273cc3055cb5829fe62dce88e596c21ae85ef1c2 (diff) | |
download | mpv-a6000d3114214cf697d628ad09c8ca226c31340d.tar.bz2 mpv-a6000d3114214cf697d628ad09c8ca226c31340d.tar.xz |
vo_wlshm: use memfd_create() instead of shm_open()
This syscall avoids the need to guess an unused filename in /dev/shm and
allows seals to be placed on it. We immediately return if no fd got
returned, as there isn’t anything we can do otherwise.
Seals especially allow the compositor to drop the SIGBUS protections,
since the kernel promises the fd won’t ever shrink.
This removes support for any platform but Linux from this vo.
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -323,6 +323,12 @@ iconv support use --disable-iconv.", 'func': check_statement('sys/vfs.h', 'struct statfs fs; fstatfs(0, &fs); fs.f_namelen') }, { + 'name': 'memfd_create', + 'desc': "Linux's memfd_create()", + 'deps': 'os-linux', + 'func': check_statement('sys/mman.h', + 'memfd_create("mpv", MFD_CLOEXEC | MFD_ALLOW_SEALING)') + }, { 'name': '--libsmbclient', 'desc': 'Samba support (makes mpv GPLv3)', 'deps': 'libdl && gpl', |