From 253ad8371ad8ebf88ca3acf9cda7b9a3c58347ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 24 May 2018 16:30:33 +0200 Subject: Fix compilation with SDL2 2.0.6 --- c_src/sdl_stdinc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c_src/sdl_stdinc.c b/c_src/sdl_stdinc.c index 9aef17e..216d6ad 100644 --- a/c_src/sdl_stdinc.c +++ b/c_src/sdl_stdinc.c @@ -24,5 +24,9 @@ NIF_ATOM_TO_ENUM_FUNCTION(atom_to_bool, SDL_bool, BOOL_ENUM) NIF_FUNCTION(get_num_allocations) { +#if SDL_VERSION_ATLEAST(2, 0, 7) return enif_make_int(env, SDL_GetNumAllocations()); +#else + return atom_undefined; +#endif } -- cgit v1.2.3