SDL: wayland: Use MAP_PRIVATE when mapping the keyboard keymap file descriptor

From e89389ba0e6d498f6130eb1d7c84a350d0799669 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Fri, 14 Oct 2022 20:41:10 -0400
Subject: [PATCH] wayland: Use MAP_PRIVATE when mapping the keyboard keymap
 file descriptor

Per the Wayland spec, this must be mapped with MAP_PRIVATE in version 7 of the protocol and higher.
---
 src/video/wayland/SDL_waylandevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c
index 57914877dca6..99a0bc34f259 100644
--- a/src/video/wayland/SDL_waylandevents.c
+++ b/src/video/wayland/SDL_waylandevents.c
@@ -922,7 +922,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
         return;
     }
 
-    map_str = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
+    map_str = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
     if (map_str == MAP_FAILED) {
         close(fd);
         return;