aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure9
-rw-r--r--util/qemu-openpty.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/configure b/configure
index c70b43d139..978505611b 100755
--- a/configure
+++ b/configure
@@ -2402,6 +2402,12 @@ else
l2tpv3=no
fi
+if check_include "pty.h" ; then
+ pty_h=yes
+else
+ pty_h=no
+fi
+
#########################################
# vhost interdependencies and host support
@@ -7893,6 +7899,9 @@ fi
if test "$sheepdog" = "yes" ; then
echo "CONFIG_SHEEPDOG=y" >> $config_host_mak
fi
+if test "$pty_h" = "yes" ; then
+ echo "HAVE_PTY_H=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 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 <pty.h>
#elif defined CONFIG_BSD
# include <termios.h>