From: Philippe Mathieu-Daudé Date: Mon, 23 Aug 2021 10:04:54 +0000 (+0200) Subject: ui/console: Restrict udmabuf_fd() to Linux X-Git-Tag: v6.2.0-rc0~126^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b956577af1b88e950bf2aa5f77be6c8aee04e879;p=thirdparty%2Fqemu.git ui/console: Restrict udmabuf_fd() to Linux Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210823100454.615816-3-philmd@redhat.com> Signed-off-by: Gerd Hoffmann --- diff --git a/include/ui/console.h b/include/ui/console.h index b30b63976a5..3be21497a2e 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -471,7 +471,9 @@ bool vnc_display_reload_certs(const char *id, Error **errp); /* input.c */ int index_from_key(const char *key, size_t key_length); +#ifdef CONFIG_LINUX /* udmabuf.c */ int udmabuf_fd(void); +#endif #endif diff --git a/ui/meson.build b/ui/meson.build index a3a187d633a..7d25c1b95b5 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -12,12 +12,14 @@ softmmu_ss.add(files( 'kbd-state.c', 'keymaps.c', 'qemu-pixman.c', - 'udmabuf.c', )) softmmu_ss.add([spice_headers, files('spice-module.c')]) softmmu_ss.add(when: spice_protocol, if_true: files('vdagent.c')) -softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c')) +softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files( + 'input-linux.c', + 'udmabuf.c', +)) softmmu_ss.add(when: cocoa, if_true: files('cocoa.m')) vnc_ss = ss.source_set() diff --git a/ui/udmabuf.c b/ui/udmabuf.c index 23abe1e7eb9..cebceb26100 100644 --- a/ui/udmabuf.c +++ b/ui/udmabuf.c @@ -8,8 +8,6 @@ #include "qapi/error.h" #include "ui/console.h" -#ifdef CONFIG_LINUX - #include #include @@ -29,12 +27,3 @@ int udmabuf_fd(void) } return udmabuf; } - -#else - -int udmabuf_fd(void) -{ - return -1; -} - -#endif