Skip to content

Commit 6ea2c8c

Browse files
authored
[Wayland] Use anonymous file abstraction for wayland-keymap sharing (#753)
* [Wayland] Use read-only anonymous file abstraction for wayland-keymap sharing Add ro_anonymous_file, an abstraction around anonymous read-only files. Files can be created by calling os_ro_anonymous_file_create(), passing the data of the file. Subsequent calls to os_ro_anonymous_file_get_fd() return a fd that's ready to be send over the socket. Use this new abstraction in meta-wayland-keyboard for sending keymap data to the clients without having to copy it unnecessarily. * debian: Update libmuffin0.symbols * Fix indents
1 parent ff74590 commit 6ea2c8c

File tree

12 files changed

+780
-73
lines changed

12 files changed

+780
-73
lines changed

config.h.meson

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,12 @@
7676

7777
/* Whether the Xwayland supports +/-byteswappedclients */
7878
#mesondefine HAVE_XWAYLAND_BYTE_SWAPPED_CLIENTS
79+
80+
/* Whether the mkostemp function exists */
81+
#mesondefine HAVE_MKOSTEMP
82+
83+
/* Whether the posix_fallocate function exists */
84+
#mesondefine HAVE_POSIX_FALLOCATE
85+
86+
/* Whether the memfd_create function exists */
87+
#mesondefine HAVE_MEMFD_CREATE

debian/libmuffin0.symbols

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,6 +2023,11 @@ libmuffin.so.0 libmuffin0 #MINVER#
20232023
meta_activate_session@Base 6.0.0
20242024
meta_add_clutter_debug_flags@Base 5.3.0
20252025
meta_add_verbose_topic@Base 5.3.0
2026+
meta_anonymous_file_close_fd@Base 6.4.1
2027+
meta_anonymous_file_free@Base 6.4.1
2028+
meta_anonymous_file_new@Base 6.4.1
2029+
meta_anonymous_file_open_fd@Base 6.4.1
2030+
meta_anonymous_file_size@Base 6.4.1
20262031
meta_backend_add_gpu@Base 5.3.0
20272032
meta_backend_get_dnd@Base 5.3.0
20282033
meta_backend_get_gpus@Base 5.3.0

meson.build

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,20 @@ if cc.has_header_symbol('sys/prctl.h', 'prctl')
373373
cdata.set('HAVE_SYS_PRCTL', 1)
374374
endif
375375

376+
optional_functions = [
377+
'mkostemp',
378+
'posix_fallocate',
379+
'memfd_create',
380+
]
381+
382+
foreach function : optional_functions
383+
if cc.has_function(function)
384+
cdata.set('HAVE_' + function.to_upper(), 1)
385+
else
386+
message('Optional function ' + function + ' missing')
387+
endif
388+
endforeach
389+
376390
have_xwayland_initfd = false
377391
have_xwayland_listenfd = false
378392

0 commit comments

Comments
 (0)