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 - Patch Haiku to use dlopen instead of load_add_on
Summary: Patch Haiku to use dlopen instead of load_add_on
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: loadso (show other bugs)
Version: HG 2.0
Hardware: All Haiku
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-31 19:43 UTC by Kai Sterker
Modified: 2016-11-01 17:32 UTC (History)
0 users

See Also:


Attachments
Remove Haiku specific dynamic object loading and replace it with posix (5.57 KB, patch)
2016-10-31 19:43 UTC, Kai Sterker
Details | Diff

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