From be0fb5cc46392c203c5c7885efdfe4f0cd579751 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 6 May 2013 13:24:39 -0700 Subject: auto-include malloc/free when SDL is used; fixes #1139 --- system/lib/sdl.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 system/lib/sdl.cpp (limited to 'system/lib/sdl.cpp') 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 + +// force malloc&free to be included in from libc +struct Force { + Force() { + void *x = malloc(10); + free(x); + } +}; + +static Force f; + -- cgit v1.2.3-18-g5258