void-packages/srcpkgs/kitty/patches/musl.patch
2019-08-02 21:03:30 +02:00

37 lines
1.5 KiB
Diff

From 9cbb726566f14454b24d05e6e94c640997fc77ff Mon Sep 17 00:00:00 2001
From: Kovid Goyal <kovid@kovidgoyal.net>
Date: Tue, 30 Jul 2019 06:20:54 +0530
Subject: [PATCH] Fix #1865
---
glfw/linux_joystick.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/glfw/linux_joystick.c b/glfw/linux_joystick.c
index d40bf0233..70a86f6f3 100644
--- a/glfw/linux_joystick.c
+++ b/glfw/linux_joystick.c
@@ -144,10 +144,10 @@ static bool openJoystickDevice(const char* path)
char absBits[(ABS_CNT + 7) / 8] = {0};
struct input_id id;
- if (ioctl(linjs.fd, EVIOCGBIT(0, sizeof(evBits)), evBits) < 0 ||
- ioctl(linjs.fd, EVIOCGBIT(EV_KEY, sizeof(keyBits)), keyBits) < 0 ||
- ioctl(linjs.fd, EVIOCGBIT(EV_ABS, sizeof(absBits)), absBits) < 0 ||
- ioctl(linjs.fd, EVIOCGID, &id) < 0)
+ if (ioctl(linjs.fd, (int32_t)EVIOCGBIT(0, sizeof(evBits)), evBits) < 0 ||
+ ioctl(linjs.fd, (int32_t)EVIOCGBIT(EV_KEY, sizeof(keyBits)), keyBits) < 0 ||
+ ioctl(linjs.fd, (int32_t)EVIOCGBIT(EV_ABS, sizeof(absBits)), absBits) < 0 ||
+ ioctl(linjs.fd, (int32_t)EVIOCGID, &id) < 0)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Linux: Failed to query input device: %s",
@@ -165,7 +165,7 @@ static bool openJoystickDevice(const char* path)
char name[256] = "";
- if (ioctl(linjs.fd, EVIOCGNAME(sizeof(name)), name) < 0)
+ if (ioctl(linjs.fd, (int32_t)EVIOCGNAME(sizeof(name)), name) < 0)
strncpy(name, "Unknown", sizeof(name));
char guid[33] = "";