| Summary: | can't build on linux with an old kernel | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ozkan Sezer <sezeroz> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.5 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/0fb14a4fca0b |
On a Linux-x86 system with 2.6.27.25 kernel: /home/me/SDL2-2.0.5/src/core/linux/SDL_evdev.c: In function 'SDL_EVDEV_Poll': /home/me/SDL2-2.0.5/src/core/linux/SDL_evdev.c:454: error: 'ABS_MT_SLOT' undeclared (first use in this function) /home/me/SDL2-2.0.5/src/core/linux/SDL_evdev.c:454: error: (Each undeclared identifier is reported only once /home/me/SDL2-2.0.5/src/core/linux/SDL_evdev.c:454: error: for each function it appears in.) /home/me/SDL2-2.0.5/src/core/linux/SDL_evdev.c:459: error: 'ABS_MT_TRACKING_ID' undeclared (first use in this function) /home/me/SDL2-2.0.5/src/core/linux/SDL_evdev.c:469: error: 'ABS_MT_POSITION_X' undeclared (first use in this function) /home/me/SDL2-2.0.5/src/core/linux/SDL_evdev.c:477: error: 'ABS_MT_POSITION_Y' undeclared (first use in this function) Applying the following makes it compile: diff -r fbf9b0e3589a src/core/linux/SDL_evdev.c --- a/src/core/linux/SDL_evdev.c Sat Oct 22 17:53:03 2016 -0700 +++ b/src/core/linux/SDL_evdev.c Thu Oct 27 19:54:15 2016 +0200 @@ -57,6 +57,14 @@ #define SYN_DROPPED 3 #endif +/* These are not defined in older Linux kernel headers. */ +#ifndef ABS_MT_SLOT +#define ABS_MT_SLOT 0x2f +#define ABS_MT_POSITION_X 0x35 +#define ABS_MT_POSITION_Y 0x36 +#define ABS_MT_TRACKING_ID 0x39 +#endif + typedef struct SDL_evdevlist_item { char *path;