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 1115

Summary: [patch] Improve compatibility of header files with SDL 1.2 applications
Product: SDL Reporter: Martin Decky <martin>
Component: videoAssignee: 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: Proposed patch

Description Martin Decky 2011-02-12 12:01:18 UTC
Created attachment 565 [details]
Proposed patch

When compiling QEMU (latest Git sources) with SDL (latest hg sources), the following compilation errors are encountered

  CC    audio/sdlaudio.o
cc1: warnings being treated as errors
In file included from /usr/local/include/SDL/SDL.h:82:0,
                 from audio/sdlaudio.c:24:
/usr/local/include/SDL/SDL_hints.h:157:1: error: function declaration isn’t a prototype
  CC    ui/sdl.o
cc1: warnings being treated as errors
In file included from ui/sdl.c:29:0:
/usr/local/include/SDL/SDL_syswm.h:228:34: error: redundant redeclaration of ‘SDL_GetWindowWMInfo’
/usr/local/include/SDL/SDL_video.h:611:34: note: previous declaration of ‘SDL_GetWindowWMInfo’ was here

These errors can be fixed by slightly patching some of the header files (see patch attached). The patch to SDL_hints.h is trivial, the patches to SDL_video.h and SDL_sysvideo.h hopefully won't cause any problems either.
Comment 1 Sam Lantinga 2011-02-12 12:05:09 UTC
This is in the repository, thanks!
http://hg.libsdl.org/SDL/rev/3c94c559f5c2