| Summary: | Patch: enable joystick/haptic/evdev support by default on FreeBSD | ||
|---|---|---|---|
| Product: | SDL | Reporter: | doctorwhoguy |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | iwtcex |
| Version: | don't know | ||
| Hardware: | All | ||
| OS: | FreeBSD | ||
| Attachments: |
patch for configure
FreeBSD compilation fix FreeBSD compilation fix avoid private headers |
||
|
Description
doctorwhoguy
2020-11-01 00:29:03 UTC
Patch added, thanks! https://hg.libsdl.org/SDL/rev/635b76aa9290 SDL's evdev joystick support doesn't work on FreeBSD:
/buildbot/worker/SDL/sdl-freebsd-amd64/src/src/joystick/linux/SDL_sysjoystick.c:26:2: error: SDL now requires a Linux 2.4+ kernel with /dev/input/event support.
#error SDL now requires a Linux 2.4+ kernel with /dev/input/event support.
^
/buildbot/worker/SDL/sdl-freebsd-amd64/src/src/joystick/linux/SDL_sysjoystick.c:35:10: fatal error: 'sys/inotify.h' file not found
#include <sys/inotify.h>
^~~~~~~~~~~~~~~
Can you provide a working patch for FreeBSD? Created attachment 4531 [details]
FreeBSD compilation fix
(In reply to Alex S from comment #4) > Created attachment 4531 [details] > FreeBSD compilation fix Evdev headers aren't actually included in the base system (well, it has a private copy), they are available through the devel/evdev-proto port instead. We also have devel/libinotify and devel/libudev-devd shims, I didn't verify whether they work with SDL. Created attachment 4532 [details]
FreeBSD compilation fix
(Not sure what happened to the previous attachment.)
Patch added, thanks! https://hg.libsdl.org/SDL/rev/2929659b559b (In reply to Sam Lantinga from comment #7) > Patch added, thanks! > https://hg.libsdl.org/SDL/rev/2929659b559b Ah, that's not quite enough. You need to: 1. rename src/joystick/bsd/SDL_sysjoystick.c to something; 2. regenerate configure. Looks like we have a collision with https://hg.libsdl.org/SDL/rev/2e58bfc28b4e. (Again, the headers in the base system are intended for drivers and should not be used for compiling non-base applications. At least that's the policy for now: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240964#c19.) Do you need a patch reverting the changes? Created attachment 4537 [details] avoid private headers > patch reverting the changes Patch applied: https://hg.libsdl.org/SDL/rev/718090fd68db Does this mean that FreeBSD can't use this by default? (In reply to Sam Lantinga from comment #12) > Patch applied: > https://hg.libsdl.org/SDL/rev/718090fd68db > > Does this mean that FreeBSD can't use this by default? I don't quite understand the question. |