diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-06 13:24:39 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-06 13:35:33 -0700 |
commit | be0fb5cc46392c203c5c7885efdfe4f0cd579751 (patch) | |
tree | d69fa9d49db4d208e19c1f078835b0d71f0af35f /system | |
parent | 39479d6ea74aabc297c52f65aefe09df2a8657b3 (diff) |
auto-include malloc/free when SDL is used; fixes #1139
Diffstat (limited to 'system')
-rw-r--r-- | system/lib/sdl.cpp | 13 | ||||
-rw-r--r-- | system/lib/sdl.symbols | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/system/lib/sdl.cpp b/system/lib/sdl.cpp new file mode 100644 index 00000000..7038cdb1 --- /dev/null +++ b/system/lib/sdl.cpp @@ -0,0 +1,13 @@ + +#include <stdlib.h> + +// force malloc&free to be included in from libc +struct Force { + Force() { + void *x = malloc(10); + free(x); + } +}; + +static Force f; + diff --git a/system/lib/sdl.symbols b/system/lib/sdl.symbols new file mode 100644 index 00000000..c2c0af42 --- /dev/null +++ b/system/lib/sdl.symbols @@ -0,0 +1 @@ + W SDL_Init |