fix NetBSD C90 build failure
authorOzkan Sezer <sezeroz@gmail.com>
Thu, 01 Nov 2018 12:35:00 +0300
changeset 1237861b267339239
parent 12377 84618d571795
child 12379 5dc13016cf34
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
src/joystick/bsd/SDL_sysjoystick.c
     1.1 --- a/src/joystick/bsd/SDL_sysjoystick.c	Wed Oct 31 20:17:53 2018 -0700
     1.2 +++ b/src/joystick/bsd/SDL_sysjoystick.c	Thu Nov 01 12:35:00 2018 +0300
     1.3 @@ -299,6 +299,10 @@
     1.4      struct hid_item hitem;
     1.5      struct hid_data *hdata;
     1.6      struct report *rep = NULL;
     1.7 +#if defined(__NetBSD__)
     1.8 +    usb_device_descriptor_t udd;
     1.9 +    struct usb_string_desc usd;
    1.10 +#endif
    1.11      int fd;
    1.12      int i;
    1.13  
    1.14 @@ -350,8 +354,6 @@
    1.15          rep->rid = -1;          /* XXX */
    1.16      }
    1.17  #if defined(__NetBSD__)
    1.18 -    usb_device_descriptor_t udd;
    1.19 -    struct usb_string_desc usd;
    1.20      if (ioctl(fd, USB_GET_DEVICE_DESC, &udd) == -1)
    1.21          goto desc_failed;
    1.22