chardev: Add macOS to list of OSes that support -chardev serial
PATCH 1/1 chardev: Add macOS to list of OSes that support -chardev serial
macOS API for dealing with serial ports/ttys is identical to BSDs.
---
Note that the same file has a line
Quoted 1 line
#endif /* linux || sun */
that is severely out of date.
chardev/char-serial.c | 2 +- include/qemu/osdep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
chardev/char-serial.c +1 -1
@@ -53,7 +53,7 @@ static void qmp_chardev_open_serial(Chardev *chr,#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__)static void tty_serial_init (int fd,int speed,int parity,int data_bits,int stop_bits)
include/qemu/osdep.h +1 -1
@@ -379,7 +379,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);#define HAVE_CHARDEV_SERIAL 1#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__)#define HAVE_CHARDEV_SERIAL 1#endif
Signature · 1 line
2.19.1
Quoted 32 lines · Mikhail Gusarov
macOS API for dealing with serial ports/ttys is identical to BSDs.
Signed-off-by Mikhail Gusarov <[email protected]>---
Note that the same file has a line
Quoted 1 line
#endif /* linux || sun */
that is severely out of date.
chardev/char-serial.c | 2 +- include/qemu/osdep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)chardev/char-serial.c +1
-1@@ -53,7 +53,7 @@ static void qmp_chardev_open_serial(Chardev *chr,#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__)static void tty_serial_init (int fd,int speed,int parity,int data_bits,int stop_bits)include/qemu/osdep.h +0
-0
include/qemu/osdep.h void qemu_anon_ram_free(void *ptr, size_t size); · line 385
Quoted 8 lines
include/qemu/osdep.h +1
-1@@ -379,7 +379,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);#define HAVE_CHARDEV_SERIAL 1#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__)#define HAVE_CHARDEV_SERIAL 1#endif
Laurent Vivier
AppliedLe 26/04/2020 à 23:09, Mikhail Gusarov a écrit :
Quoted 32 lines
macOS API for dealing with serial ports/ttys is identical to BSDs.
Signed-off-by Mikhail Gusarov <[email protected]>---
Note that the same file has a line
Quoted 1 line
#endif /* linux || sun */
that is severely out of date.
chardev/char-serial.c | 2 +- include/qemu/osdep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)chardev/char-serial.c +1
-1@@ -53,7 +53,7 @@ static void qmp_chardev_open_serial(Chardev *chr,#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__)static void tty_serial_init (int fd,int speed,int parity,int data_bits,int stop_bits)include/qemu/osdep.h +0
-0
include/qemu/osdep.h void qemu_anon_ram_free(void *ptr, size_t size); · line 385
Quoted 8 lines
include/qemu/osdep.h +1
-1@@ -379,7 +379,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);#define HAVE_CHARDEV_SERIAL 1#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__)#define HAVE_CHARDEV_SERIAL 1#endif
Applied to my trivial-patches branch.
Thanks,
Laurent