aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/qemu-common.h12
-rw-r--r--qemu-char.c10
-rw-r--r--ui/gtk.c1
3 files changed, 12 insertions, 11 deletions
diff --git a/include/qemu-common.h b/include/qemu-common.h
index b399d855c1..af769f5ad2 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -42,6 +42,18 @@
#include <signal.h>
#include "glib-compat.h"
+#if defined(__GLIBC__)
+# include <pty.h>
+#elif defined CONFIG_BSD
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+# include <libutil.h>
+# else
+# include <util.h>
+# endif
+#elif defined CONFIG_SOLARIS
+# include <stropts.h>
+#endif
+
#ifdef _WIN32
#include "sysemu/os-win32.h"
#endif
diff --git a/qemu-char.c b/qemu-char.c
index 64e824d0ac..30a2ddfb67 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -53,13 +53,6 @@
#include <sys/select.h>
#ifdef CONFIG_BSD
#include <sys/stat.h>
-#if defined(__GLIBC__)
-#include <pty.h>
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-#include <libutil.h>
-#else
-#include <util.h>
-#endif
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <dev/ppbus/ppi.h>
#include <dev/ppbus/ppbconf.h>
@@ -69,8 +62,6 @@
#endif
#else
#ifdef __linux__
-#include <pty.h>
-
#include <linux/ppdev.h>
#include <linux/parport.h>
#endif
@@ -87,7 +78,6 @@
#include <netinet/tcp.h>
#include <net/if.h>
#include <syslog.h>
-#include <stropts.h>
#endif
#endif
#endif
diff --git a/ui/gtk.c b/ui/gtk.c
index 841f912146..52c3f95ffb 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -55,7 +55,6 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/wait.h>
-#include <pty.h>
#include <math.h>
#include "ui/console.h"