char-pty: remove unnecessary #ifdef
PATCH 1/1 char-pty: remove unnecessary #ifdef
For some reason __APPLE__ was not checked in pty code. However, the #ifdef is redundant: this file is already compiled only if CONFIG_POSIX, same as util/qemu-openpty.c which it uses.
--- chardev/char-pty.c | 6 ------ 1 file changed, 6 deletions(-)
chardev/char-pty.c +0 -6
@@ -31,10 +31,6 @@#include "chardev/char-io.h" -#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ - || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) - typedef struct { Chardev parent; QIOChannel *ioc;
@@ -299,5 +295,3 @@ static void register_types(void) }type_init (register_types); - -#endif
Signature · 1 line
2.17.1
Quoted 4 lines · Paolo Bonzini
For some reason
__APPLE__was not checked in pty code. However, the #ifdef is redundant: this file is already compiled only ifCONFIG_POSIX, same asutil/qemu-openpty.cwhich it uses.
Thanks Paolo!
FWIW, qemu_openpty_raw and qemu_pipe are declared for all operating systems except _WIN32 in qemu-common.h. For sake of symmetry, should the declarations be available only for CONFIG_POSIX?
--
Roman
Quoted 11 lines · Roman Bolshakov
Quoted 4 lines · Paolo Bonzini
For some reason
__APPLE__was not checked in pty code. However, the #ifdef is redundant: this file is already compiled only ifCONFIG_POSIX, same asutil/qemu-openpty.cwhich it uses.Thanks Paolo!
FWIW,
qemu_openpty_rawandqemu_pipeare declared for all operating systems except_WIN32inqemu-common.h. For sake of symmetry, should the declarations be available only forCONFIG_POSIX?
I would even move them out of qemu-common.h to a separate qemu/openpty.h file...
Paolo
Quoted 4 lines · Paolo Bonzini
For some reason
__APPLE__was not checked in pty code. However, the #ifdef is redundant: this file is already compiled only ifCONFIG_POSIX, same asutil/qemu-openpty.cwhich it uses.
Hi Paolo,
Is it possible to apply the patch for master and 3.1 branch?
I'm trying to bring up qemu + libvirt on macOS. If it goes to 3.1, then libvirt 4.7.0 and QEMU 3.1 are going to be a working solution for virtualization on macOS.
Lack of pty devices prevents a user from using valid domain xml with serial console and virsh console command.
--
Thank you,
Roman