| Summary: | SDL_evdev.c uses Linux specific integer types | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Jan Martin Mikkelsen <janm> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.9 | ||
| Hardware: | x86 | ||
| OS: | Other | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/728c6562100f |
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. Patch: diff -dur SDL2-2.0.9.orig/src/core/linux/SDL_evdev.c SDL2-2.0.9/src/core/linux/SDL_evdev.c --- SDL2-2.0.9.orig/src/core/linux/SDL_evdev.c 2018-10-31 16:07:22.000000000 +0100 +++ SDL2-2.0.9/src/core/linux/SDL_evdev.c 2019-05-29 18:32:01.620472000 +0200 @@ -512,8 +512,8 @@ * * this is the structure we're trying to emulate */ - __u32* mt_req_code; - __s32* mt_req_values; + uint32_t* mt_req_code; + int32_t* mt_req_values; size_t mt_req_size; /* TODO: sync devices other than touchscreen */ @@ -528,7 +528,7 @@ return; } - mt_req_values = (__s32*)mt_req_code + 1; + mt_req_values = (int32_t*)mt_req_code + 1; *mt_req_code = ABS_MT_TRACKING_ID; ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);