From c9c8b88f0bee1bf9e5f2011c67f8b579b6cf68d0 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 13 Jul 2020 14:36:09 +0100 Subject: util/qemu-openpty.c: Don't assume pty.h is glibc-only Instead of using an OS-specific ifdef test to select the "openpty() is in pty.h" codepath, make configure check for the existence of the header and use the new CONFIG_PTY instead. This is necessary to build on Haiku, which also provides openpty() via pty.h. Signed-off-by: David Carlier Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Message-id: 20200703145614.16684-3-peter.maydell@linaro.org [PMM: Expanded commit message; rename to HAVE_PTY_H] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- util/qemu-openpty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/qemu-openpty.c') diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c index 4b8df96f38..eb17f5b0bc 100644 --- a/util/qemu-openpty.c +++ b/util/qemu-openpty.c @@ -35,7 +35,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#if defined(__GLIBC__) +#if defined HAVE_PTY_H # include #elif defined CONFIG_BSD # include -- cgit 1.4.1