mirror of https://github.com/encounter/SDL.git
fix NetBSD C90 build failure
src/vendor/SDL2/src/joystick/bsd/SDL_sysjoystick.c:353:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] reported by 'bch' at https://discourse.libsdl.org/t/25231
This commit is contained in:
parent
329f2eb99e
commit
d42728ec10
|
@ -299,6 +299,10 @@ BSD_JoystickOpen(SDL_Joystick * joy, int device_index)
|
||||||
struct hid_item hitem;
|
struct hid_item hitem;
|
||||||
struct hid_data *hdata;
|
struct hid_data *hdata;
|
||||||
struct report *rep = NULL;
|
struct report *rep = NULL;
|
||||||
|
#if defined(__NetBSD__)
|
||||||
|
usb_device_descriptor_t udd;
|
||||||
|
struct usb_string_desc usd;
|
||||||
|
#endif
|
||||||
int fd;
|
int fd;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -350,8 +354,6 @@ BSD_JoystickOpen(SDL_Joystick * joy, int device_index)
|
||||||
rep->rid = -1; /* XXX */
|
rep->rid = -1; /* XXX */
|
||||||
}
|
}
|
||||||
#if defined(__NetBSD__)
|
#if defined(__NetBSD__)
|
||||||
usb_device_descriptor_t udd;
|
|
||||||
struct usb_string_desc usd;
|
|
||||||
if (ioctl(fd, USB_GET_DEVICE_DESC, &udd) == -1)
|
if (ioctl(fd, USB_GET_DEVICE_DESC, &udd) == -1)
|
||||||
goto desc_failed;
|
goto desc_failed;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue