libsdl-org / sdl12-compat

An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes.
Other
191 stars 40 forks source link

SDL_config: Define HAVE_MALLOC_H on glibc-based platforms #302

Closed smcv closed 1 year ago

smcv commented 1 year ago

Version 3.7.4 of the Freespace 2 Source Code Project is known to rely on SDL having checked for this, and won't see a declaration of malloc_usable_size() if we don't.

This is a workaround for source compatibility with classic SDL 1.2: if a game wants to use functions from a particular system header file, it should be that game's responsibility to check for the header file itself.

Bug-Debian: https://bugs.debian.org/1012232#58


Same sort of idea as #299, providing bug-for-bug compatibility with SDL 1.2 in places where it breaks compilation of old SDL 1.2 codebases. (At this point I have almost compiled all of Debian's remaining SDL 1.2 packages against sdl12-compat...)