Message ID | CA+XhMqxRDPotkG6ioYipzZNMLj-w1CbFbz2cd6BPet8GQ4r8oA@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/5] haiku build fix | expand |
On Fri, 26 Jun 2020 at 11:10, David CARLIER <devnexen@gmail.com> wrote: > > From 19a41d406eda976001827d248398d7fb172d140b Mon Sep 17 00:00:00 2001 > From: David Carlier <devnexen@gmail.com> > Date: Fri, 26 Jun 2020 10:38:17 +0000 > Subject: [PATCH 2/5] Enable *pty API. > > Signed-off-by: David Carlier <devnexen@gmail.com> > --- > configure | 9 +++++++++ > util/qemu-openpty.c | 2 +- > 2 files changed, 10 insertions(+), 1 deletion(-) Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/configure b/configure index 96ba4cf3ce..f040b07463 100755 --- a/configure +++ b/configure @@ -2373,6 +2373,12 @@ else l2tpv3=no fi +if check_include "pty.h" ; then + pty_h=yes +else + pty_h=no +fi + ######################################### # vhost interdependencies and host support @@ -7758,6 +7764,9 @@ fi if test "$sheepdog" = "yes" ; then echo "CONFIG_SHEEPDOG=y" >> $config_host_mak fi +if test "$pty_h" = "yes" ; then + echo "CONFIG_PTY=y" >> $config_host_mak +fi if test "$fuzzing" = "yes" ; then if test "$have_fuzzer" = "yes"; then FUZZ_LDFLAGS=" -fsanitize=address,fuzzer" diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c index 2e8b43bdf5..9d8ad6905e 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 CONFIG_PTY # include <pty.h> #elif defined CONFIG_BSD # include <termios.h>