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.
Reported-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
chardev/char-pty.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index 68fd4e20c3..e8d9a53476 100644
--- a/chardev/char-pty.c
+++ b/chardev/char-pty.c
@@ -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
--
2.17.1
On Wed, Aug 22, 2018 at 12:38:35PM +0200, Paolo Bonzini wrote: > 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. > 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
On 23/08/2018 00:12, Roman Bolshakov wrote: > On Wed, Aug 22, 2018 at 12:38:35PM +0200, Paolo Bonzini wrote: >> 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. >> > > 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? I would even move them out of qemu-common.h to a separate qemu/openpty.h file... Paolo
On Wed, Aug 22, 2018 at 12:38:35PM +0200, Paolo Bonzini wrote: > 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. > 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
© 2016 - 2025 Red Hat, Inc.