Skip to content

Map xkb fd as private to comply with wayland v7#19094

Merged
LibretroAdmin merged 1 commit into
libretro:masterfrom
ColinKinloch:xkb_mmap_private
Jun 7, 2026
Merged

Map xkb fd as private to comply with wayland v7#19094
LibretroAdmin merged 1 commit into
libretro:masterfrom
ColinKinloch:xkb_mmap_private

Conversation

@ColinKinloch

Copy link
Copy Markdown
Contributor

From the wayland core spec:

From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.

https://wayland.app/protocols/wayland#wl_keyboard:event:keymap

Guidelines

  1. Rebase before opening a pull request
  2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
  3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises
  4. RetroArch codebase follows C89 coding rules for portability across many old platforms check using C89_BUILD=1

Description

This makes it so that if RetroArch writes to the mapped keyboard layout memory those changes aren't shared with other processes. This should have no effect in reality but was added to the wayland protocol spec.

Related Issues

Related Pull Requests

Reviewers

From the wayland core spec:
> From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.
@LibretroAdmin

Copy link
Copy Markdown
Contributor

This remains backwards compatible so no issues with pre-v7 ?

@ColinKinloch

Copy link
Copy Markdown
Contributor Author

That's right. I don't think there's a reason not to have it mapped as private.

@LibretroAdmin LibretroAdmin merged commit 9292e26 into libretro:master Jun 7, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants