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 - [PATCH] Build fix for joystick/linux/SDL_sysjoystick.c
Summary: [PATCH] Build fix for joystick/linux/SDL_sysjoystick.c
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-23 12:47 UTC by Mark de Wever
Modified: 2013-02-24 12:57 UTC (History)
0 users

See Also:


Attachments
Patch fixing compilation (855 bytes, application/octet-stream)
2013-02-23 12:47 UTC, Mark de Wever
Details

Note You need to log in before you can comment on or make changes to this bug.
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