From e35ee7c1aa1f257d3e0e52422cf4bd79d3b68d58 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Tue, 19 Apr 2016 16:55:21 -0300 Subject: [PATCH] cocoa: cocoa_display_init() stub One less #ifdef in vl.c. Signed-off-by: Eduardo Habkost --- include/ui/console.h | 9 +++++++++ vl.c | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index f3e749ddd5..7ac997f514 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -442,7 +442,16 @@ static inline void sdl_display_init(DisplayState *ds, int full_screen, #endif /* cocoa.m */ +#ifdef CONFIG_COCOA void cocoa_display_init(DisplayState *ds, int full_screen); +#else +static inline void cocoa_display_init(DisplayState *ds, int full_screen) +{ + /* This must never be called if CONFIG_COCOA is disabled */ + error_report("Cocoa support is disabled"); + abort(); +} +#endif /* vnc.c */ void vnc_display_init(const char *id); diff --git a/vl.c b/vl.c index d5df442701..064870561a 100644 --- a/vl.c +++ b/vl.c @@ -4545,11 +4545,9 @@ int main(int argc, char **argv, char **envp) case DT_SDL: sdl_display_init(ds, full_screen, no_frame); break; -#if defined(CONFIG_COCOA) case DT_COCOA: cocoa_display_init(ds, full_screen); break; -#endif #if defined(CONFIG_GTK) case DT_GTK: gtk_display_init(ds, full_screen, grab_on_hover);