From: Stefan Weil Date: Thu, 18 Jun 2009 18:11:03 +0000 (+0200) Subject: Win32: Fix compilation with SDL. X-Git-Tag: TizenStudio_2.0_p2.3~8590 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e29a50f1d9ce6e3d2b40a5f7d2e32bcba00c8a89;p=sdk%2Femulator%2Fqemu.git Win32: Fix compilation with SDL. `sdl-config --cflags` defines main = SDL_main on some platforms. One of these platforms is Windows with mingw32. For those platforms, the solution already developed for __APPLE__ is now applied. A compiler warning (missing return value) is fixed, too. Maybe __APPLE__ no longer needs a separate check. Signed-off-by: Stefan Weil Signed-off-by: Anthony Liguori --- diff --git a/vl.c b/vl.c index 7ef9748..60a00e1 100644 --- a/vl.c +++ b/vl.c @@ -113,12 +113,12 @@ #endif #ifdef CONFIG_SDL -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(main) #include int qemu_main(int argc, char **argv, char **envp); int main(int argc, char **argv) { - qemu_main(argc, argv, NULL); + return qemu_main(argc, argv, NULL); } #undef main #define main qemu_main