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
parent
be401b5e4a
commit
720b127dee
|
@ -171,7 +171,7 @@ int keyboard_init(struct keyboard* self, const char* layout)
|
||||||
|
|
||||||
size_t keymap_len = strlen(keymap_string);
|
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)
|
if (keymap_fd < 0)
|
||||||
goto fd_failure;
|
goto fd_failure;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue