Eliminates a warning about missing function prototype for qemu_main.
PATCH 1/1 Eliminates a warning about missing function prototype for qemu_main.
This patch allows for the file vl.c to compile without any warnings.
Signed-off-by John Arbuckle <[email protected]>
--- vl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
vl.c +4 -1
@@ -107,16 +107,19 @@ extern int madvise(caddr_t, size_t, int);#ifdef CONFIG_SDL #if defined(__APPLE__) || defined(main)#include <SDL.h> -int qemu_main (int argc,char **argv,char **envp); +int main (int argc,char **argv) {return qemu_main (argc, argv,NULL ); } +#undef main#define main qemu_main#endif #endif /* CONFIG_SDL */ +int qemu_main (int argc,char **argv,char **envp); +#ifdef CONFIG_COCOA #undef main#define main qemu_main
Signature · 1 line
1.6.5.2
Quoted 14 lines · G 3 <[email protected]> wrote:
This patch allows for the file
vl.cto compile without any warnings.Signed-off-by John Arbuckle <[email protected]>--- vl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)vl.c +0
-0
vl.c extern int madvise(caddr_t, size_t, int); · line 113
Quoted 8 lines
vl.c +1
-1@@ -107,16 +107,19 @@ extern int madvise(caddr_t, size_t, int); #ifdef CONFIG_SDL #if defined(__APPLE__) || defined(main) #include <SDL.h> -int qemu_main(int argc, char **argv, char **envp); + int main(int argc, char **argv) { return qemu_main(argc, argv, NULL);
Now qemu_main() is not defined here.
vl.c extern int madvise(caddr_t, size_t, int); · line 125
Quoted 12 lines
vl.c +3
-0} +#undef main#define main qemu_main#endif #endif /* CONFIG_SDL */ +int qemu_main (int argc,char **argv,char **envp); +#ifdef CONFIG_COCOA #undef main#define main qemu_main
I suppose that you are using cocoa but not sdl, right?
If so, better approach is to share the COCOA/SDL bits for apple, or just replicate the qemu_main definition.
Later, Juan.