@@ -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
@@ -8,8 +8,6 @@
#include "qapi/error.h"
#include "ui/console.h"
-#ifdef CONFIG_LINUX
-
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -29,12 +27,3 @@ int udmabuf_fd(void)
}
return udmabuf;
}
-
-#else
-
-int udmabuf_fd(void)
-{
- return -1;
-}
-
-#endif
@@ -12,12 +12,14 @@
'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()
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- include/ui/console.h | 2 ++ ui/udmabuf.c | 11 ----------- ui/meson.build | 6 ++++-- 3 files changed, 6 insertions(+), 13 deletions(-)