[SDL] compilation under FreeBSD fails

Ryan C. Gordon icculus at clutteredmind.org
Thu Jul 25 23:27:01 PDT 2002


> I was trying to compile SDL 1.2.4 and 1.2 snapshot (Jun 15)
> and got a failure in both cases somewhere in the joystick
> area.
>
> 1.2:


Please apply the following patch and see if it fixes your problem. I have
no idea if this is correct...it's just from Googling for hid_report_size
and BSD.  If other BSDers can check this, it'd be appreciated (it looks
like NetBSD and FreeBSD need the 3rd arg to be a pointer, and OpenBSD
needs it to be an int. Argh.)

--ryan.



----snip----


diff -u -r1.10 SDL_sysjoystick.c
--- src/joystick/bsd/SDL_sysjoystick.c	2002/06/12 03:32:01	1.10
+++ src/joystick/bsd/SDL_sysjoystick.c	2002/07/26 06:23:59
@@ -409,9 +409,9 @@
 	int len;

 #ifdef USBHID_NEW
-	len = hid_report_size(rd, repinfo[repind].kind, r->rid);
-#else
 	len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
+#else
+	len = hid_report_size(rd, repinfo[repind].kind, r->rid);
 #endif
 	if (len < 0) {
 		SDL_SetError("Negative HID report size");






More information about the SDL mailing list