commit 6f88c9ec52dea9f491af8c7a20fd5d46eb82fdef parent 9495eecdf99a858d5b66f20f0127dd97f79acbb6 Author: Michael Forney <mforney@mforney.org> Date: Sat, 21 Dec 2013 13:47:03 -0800 xkb: Use posix_fallocate instead of ftruncate Diffstat:
M | libswc/xkb.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libswc/xkb.c b/libswc/xkb.c @@ -113,7 +113,7 @@ bool swc_xkb_update_keymap(struct swc_xkb * xkb) unlink(keymap_path); - if (ftruncate(xkb->keymap.fd, xkb->keymap.size) == -1) + if (posix_fallocate(xkb->keymap.fd, 0, xkb->keymap.size) != 0) { printf("could not resize XKB keymap file\n"); goto error_fd;