We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1727

Summary: [PATCH] Build fix for joystick/linux/SDL_sysjoystick.c
Product: SDL Reporter: Mark de Wever <koraq>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: Patch fixing compilation

Description Mark de Wever 2013-02-23 12:47:51 UTC
Created attachment 1052 [details]
Patch fixing compilation

Changeset 6852 [1] doesn't fix compilation for me, moving the added hunk a few lines up, as in the attached patch, fixes compilation for me.

http://hg.libsdl.org/SDL/rev/424a6a791947
Comment 1 Sam Lantinga 2013-02-23 15:01:59 UTC
That's interesting.  Why would it need to be moved up?
Comment 2 Mark de Wever 2013-02-23 23:27:34 UTC
Have a look at the original file [1] line 54: #ifdef HAVE_LIBUDEV_H

That macro is not defined on my system so the SYN_DROPPED hunk is removed by the preprocessor. Since #include <linux/joystick.h> includes #include <linux/input.h> (where SYN_DROPPED will be defined in newer kernels), the new location should work on both newer and older kernels.


[1] http://hg.libsdl.org/SDL/file/424a6a791947/src/joystick/linux/SDL_sysjoystick.c

PS: the '#include <unistd.h>' on line 60 is a duplicate of the one on line 32.
Comment 3 Sam Lantinga 2013-02-24 12:57:17 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/a3d4fd1ba315