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 seperate headers.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/chardev/char-parallel.h | 5 -----
include/chardev/char-serial.h | 8 --------
include/qemu/osdep.h | 13 +++++++++++++
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/chardev/char-parallel.h b/include/chardev/char-parallel.h
index 3284a1b96b..c09751fd6c 100644
--- a/include/chardev/char-parallel.h
+++ b/include/chardev/char-parallel.h
@@ -26,11 +26,6 @@
#include "chardev/char.h"
-#if defined(__linux__) || defined(__FreeBSD__) || \
- defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-#define HAVE_CHARDEV_PARPORT 1
-#endif
-
#define CHR_IOCTL_PP_READ_DATA 3
#define CHR_IOCTL_PP_WRITE_DATA 4
#define CHR_IOCTL_PP_READ_CONTROL 5
diff --git a/include/chardev/char-serial.h b/include/chardev/char-serial.h
index cb2e59e82a..ad6891b26d 100644
--- a/include/chardev/char-serial.h
+++ b/include/chardev/char-serial.h
@@ -26,14 +26,6 @@
#include "chardev/char.h"
-#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
-
#define CHR_IOCTL_SERIAL_SET_PARAMS 1
typedef struct {
int speed;
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 1c9f5e260c..fb008a2e65 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
--
2.13.0.91.g00982b8dd
On 06/08/2017 06:59 AM, Marc-André Lureau wrote: > 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 seperate headers. s/seperate/separate/ > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > include/chardev/char-parallel.h | 5 ----- > include/chardev/char-serial.h | 8 -------- > include/qemu/osdep.h | 13 +++++++++++++ > 3 files changed, 13 insertions(+), 13 deletions(-) > Reviewed-by: Eric Blake <eblake@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
On Thu, Jun 08, 2017 at 03:59:37PM +0400, Marc-André Lureau wrote: > 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 seperate headers. > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Thanks, that works for me. Tested-by: Anthony PERARD <anthony.perard@citrix.com> -- Anthony PERARD
© 2016 - 2025 Red Hat, Inc.