summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2009-06-18 20:11:03 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-22 10:15:30 -0500
commite29a50f1d9ce6e3d2b40a5f7d2e32bcba00c8a89 (patch)
tree2ad33274b77f25ecbcba0ec980e8355f075096c5 /vl.c
parent59165879c99f89634b511d55f409bb8cf8792f23 (diff)
downloadqemu-e29a50f1d9ce6e3d2b40a5f7d2e32bcba00c8a89.tar.gz
qemu-e29a50f1d9ce6e3d2b40a5f7d2e32bcba00c8a89.tar.bz2
qemu-e29a50f1d9ce6e3d2b40a5f7d2e32bcba00c8a89.zip
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 <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 7ef97484bf..60a00e1b25 100644
--- a/vl.c
+++ b/vl.c
@@ -113,12 +113,12 @@
#endif
#ifdef CONFIG_SDL
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(main)
#include <SDL.h>
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