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 3478

Summary: Patch Haiku to use dlopen instead of load_add_on
Product: SDL Reporter: Kai Sterker <kai.sterker>
Component: loadsoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Haiku   
Attachments: Remove Haiku specific dynamic object loading and replace it with posix

Description Kai Sterker 2016-10-31 19:43:35 UTC
Created attachment 2596 [details]
Remove Haiku specific dynamic object loading and replace it with posix

SDL2 on Haiku so far uses Haiku-specific APIs for loading dynamic objects as add-ons, instead of using dlopen to load them as libraries. This, for example, leads to SDL_mixer not being able to load its audio backends, when compiled with standard settings.

As discussed at https://www.freelists.org/post/haikuports/SDL2-mixer-ogg-music-not-playing-and-other-stuff,2 , the best way to deal with this would be using dlopen instead of load_add_on. The following patch implements this change by dropping the Haiku-specific bits and using dlopen instead.

Note that no change was made to CMakeLists.txt, as that already appears to use dlopen even on Haiku, though I have not tested that specifically.
Comment 1 Sam Lantinga 2016-11-01 17:32:10 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/15ba7a201f0a