summaryrefslogtreecommitdiff
path: root/config.h.meson
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2020-01-17 23:43:24 +0100
committerJonas Dreßler <verdre@v0yd.nl>2020-04-21 17:52:08 +0200
commit551a57ed7f2b132a8dca0f1889a24196debb43cc (patch)
tree7445a43d7e6f067361b0b6d92938bee8c72bcd30 /config.h.meson
parentb7366b5b534cbea38fed58ac435f848111924713 (diff)
downloadmutter-551a57ed7f2b132a8dca0f1889a24196debb43cc.tar.gz
Add read-only anonymous file abstraction MetaAnonymousFile
Add MetaAnonymousFile, an abstraction around anonymous read-only files. Files can be created by calling meta_anonymous_file_new(), passing the data of the file. Subsequent calls to meta_anonymous_file_open_fd() return a fd that's ready to be sent over the socket. When mapmode is META_ANONYMOUS_FILE_MAPMODE_PRIVATE the fd is only guaranteed to be mmap-able readonly with MAP_PRIVATE but does not require duplicating the file for each resource when memfd_create is available. META_ANONYMOUS_FILE_MAPMODE_SHARED may be used when the client must be able to map the file with MAP_SHARED but it also means that the file has to be duplicated even when memfd_create is available. Pretty much all of this code was written for weston by Sebastian Wick, see https://gitlab.freedesktop.org/wayland/weston/merge_requests/240. Co-authored-by: Sebastian Wick <sebastian@sebastianwick.net> https://gitlab.gnome.org/GNOME/mutter/merge_requests/1012
Diffstat (limited to 'config.h.meson')
-rw-r--r--config.h.meson9
1 files changed, 9 insertions, 0 deletions
diff --git a/config.h.meson b/config.h.meson
index 0edff4d57..f5c0e71a6 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -70,3 +70,12 @@
/* Whether Xwayland has -initfd option */
#mesondefine HAVE_XWAYLAND_INITFD
+
+/* Whether the mkostemp function exists */
+#mesondefine HAVE_MKOSTEMP
+
+/* Whether the posix_fallocate function exists */
+#mesondefine HAVE_POSIX_FALLOCATE
+
+/* Whether the memfd_create function exists */
+#mesondefine HAVE_MEMFD_CREATE