aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-07 21:33:29 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-08 17:57:36 +0400
commitd203c6439840de4e331f74208c57443f4d6a6229 (patch)
tree6df1ce7afb4d045a187ddcefcc448b157df769e1 /include/qemu/osdep.h
parent64175afc695c0672876fbbfc31b299c86d562cb4 (diff)
downloadqemu-d203c6439840de4e331f74208c57443f4d6a6229.zip
qemu-d203c6439840de4e331f74208c57443f4d6a6229.tar.gz
qemu-d203c6439840de4e331f74208c57443f4d6a6229.tar.bz2
char: fix alias devices regression
Fix regression from commit 4d43a603c71, where the serial and parallel headers got removed from char.c, which broke the alias table. Move the HAVE_CHARDEV_SERIAL/HAVE_CHARDEV_PARPORT to osdep.h instead of being in separate headers. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 1c9f5e2..fb008a2 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -284,6 +284,19 @@ void qemu_anon_ram_free(void *ptr, size_t size);
#endif
+#ifdef _WIN32
+#define HAVE_CHARDEV_SERIAL 1
+#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
+ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
+ || defined(__GLIBC__)
+#define HAVE_CHARDEV_SERIAL 1
+#endif
+
+#if defined(__linux__) || defined(__FreeBSD__) || \
+ defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#define HAVE_CHARDEV_PARPORT 1
+#endif
+
#if defined(CONFIG_LINUX)
#ifndef BUS_MCEERR_AR
#define BUS_MCEERR_AR 4