Package: libsdl1.2 / 1.2.15+dfsg2-8

fix_build_joystick_freebsd.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Robert Millan <rmh@debian.org>
Date: Sun, 10 Jul 2022 11:19:25 +0100
Subject: FreeBSD compile fix.

src/joystick/bsd/SDL_sysjoystick.c makes the invalid assumption that
__FreeBSD_kernel__ implies presence of "ucr_data" struct member.  This
breaks recent versions of FreeBSD 10-CURRENT, FreeBSD 9-STABLE and
Debian GNU/kFreeBSD "wheezy/sid".

Origin: upstream, commit:http://hg.libsdl.org/SDL/rev/62ff1c0a103f
Origin: upstream, commit:https://github.com/libsdl-org/SDL-1.2/commit/d836339ffa8885f0db97a1dbedd40ac4af05e4ec
---
 src/joystick/bsd/SDL_sysjoystick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/bsd/SDL_sysjoystick.c b/src/joystick/bsd/SDL_sysjoystick.c
index 500fc62..987df07 100644
--- a/src/joystick/bsd/SDL_sysjoystick.c
+++ b/src/joystick/bsd/SDL_sysjoystick.c
@@ -148,7 +148,7 @@ static char *joydevnames[MAX_JOYS];
 static int	report_alloc(struct report *, struct report_desc *, int);
 static void	report_free(struct report *);
 
-#if defined(USBHID_UCR_DATA) || defined(__FreeBSD_kernel__)
+#if defined(USBHID_UCR_DATA)
 #define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
 #elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063))
 #define REP_BUF_DATA(rep) ((rep)->buf->ugd_data)