keyboard: allocate shm with correct size

This was working on Linux because shm_open there returns a regular file,
but this is required on FreeBSD where shm_open returns a memory-backed fd.
pull/31/head
Greg V 2020-04-06 00:26:22 +03:00
parent be401b5e4a
commit 720b127dee
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ int keyboard_init(struct keyboard* self, const char* layout)
size_t keymap_len = strlen(keymap_string);
int keymap_fd = shm_alloc_fd(0);
int keymap_fd = shm_alloc_fd(keymap_len);
if (keymap_fd < 0)
goto fd_failure;