From e36a543cd530e887dd31c8f197a0854da8c0e805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 6 Dec 2020 09:58:56 +0100 Subject: [PATCH] allegro5: fix build w/ musl-1.2.1 (time64) --- srcpkgs/allegro5/patches/time64.patch | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 srcpkgs/allegro5/patches/time64.patch diff --git a/srcpkgs/allegro5/patches/time64.patch b/srcpkgs/allegro5/patches/time64.patch new file mode 100644 index 00000000000..93b0491c613 --- /dev/null +++ b/srcpkgs/allegro5/patches/time64.patch @@ -0,0 +1,49 @@ +--- src/linux/lhaptic.c 2015-06-01 21:58:12.000000000 +0200 ++++ src/linux/lhaptic.c 2020-12-06 09:50:58.475010832 +0100 +@@ -57,6 +57,7 @@ + + + /* forward declarations */ ++static void lhap_timerclear(struct input_event* event); + static bool lhap_init_haptic(void); + static void lhap_exit_haptic(void); + +@@ -162,6 +163,11 @@ + { -1, -1 } + }; + ++static void lhap_timerclear(struct input_event* event) ++{ ++ event->input_event_sec = 0; ++ event->input_event_usec = 0; ++} + + static bool lhap_init_haptic(void) + { +@@ -622,7 +628,7 @@ + struct input_event ie; + + lhap->parent.gain = gain; +- timerclear(&ie.time); ++ lhap_timerclear(&ie); + ie.type = EV_FF; + ie.code = FF_GAIN; + ie.value = (__s32) ((double)0xFFFF * gain); +@@ -639,7 +645,7 @@ + struct input_event ie; + + lhap->parent.autocenter = autocenter; +- timerclear(&ie.time); ++ lhap_timerclear(&ie); + ie.type = EV_FF; + ie.code = FF_AUTOCENTER; + ie.value = (__s32) ((double)0xFFFF * autocenter); +@@ -765,7 +771,7 @@ + + fd = lhap->fd; + +- timerclear(&play.time); ++ lhap_timerclear(&play); + play.type = EV_FF; + play.code = id->_handle; + loops = (loops < 0) ? 1 : loops;