void-packages/srcpkgs/mouseemu/patches/011-write_error.patch
q66 b004d06c23 New package: mouseemu-0.15
This is a daemon which allows you to emulate middle and right
click as well as a mouse wheel. It was originally written for
Apple PowerPC laptops with a single button, but can be used on
any hardware.
2020-02-09 03:10:27 +01:00

13 lines
319 B
Diff

Author: <agx@sigxcpu.org>
Description: Fix write error detection
--- a/mouseemu.c
+++ b/mouseemu.c
@@ -92,7 +92,7 @@
static void passthrough(int fd, struct input_event event)
{
- if (write(fd, &event, sizeof(event)) < sizeof(event))
+ if (write(fd, &event, sizeof(event)) <= 0)
perror("passthrough error");
}