Fixed bug 4656 - SDL_evdev.c uses Linux specific integer types
authorSam Lantinga
Wed, 05 Jun 2019 08:54:07 -0700
changeset 12760728c6562100f
parent 12759 04552ff8c83d
child 12761 f5c0b39addb1
Fixed bug 4656 - SDL_evdev.c uses Linux specific integer types

Jan Martin Mikkelsen

The file src/core/linux/SDL_evdev.c uses the Linux specific types __u32 and __s32. This breaks things on FreeBSD when building with evdev.
src/core/linux/SDL_evdev.c
     1.1 --- a/src/core/linux/SDL_evdev.c	Tue Jun 04 17:32:15 2019 -0700
     1.2 +++ b/src/core/linux/SDL_evdev.c	Wed Jun 05 08:54:07 2019 -0700
     1.3 @@ -556,8 +556,8 @@
     1.4       *
     1.5       * this is the structure we're trying to emulate
     1.6       */
     1.7 -    __u32* mt_req_code;
     1.8 -    __s32* mt_req_values;
     1.9 +    uint32_t* mt_req_code;
    1.10 +    int32_t* mt_req_values;
    1.11      size_t mt_req_size;
    1.12  
    1.13      /* TODO: sync devices other than touchscreen */
    1.14 @@ -572,7 +572,7 @@
    1.15          return;
    1.16      }
    1.17  
    1.18 -    mt_req_values = (__s32*)mt_req_code + 1;
    1.19 +    mt_req_values = (int32_t*)mt_req_code + 1;
    1.20  
    1.21      *mt_req_code = ABS_MT_TRACKING_ID;
    1.22      ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);