@@ -40,6 +40,14 @@
#include <sys/time.h>
#include <assert.h>
#include <signal.h>
+
+#if defined(__GLIBC__)
+#include <pty.h>
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#include <libutil.h>
+#else
+#include <util.h>
+#endif
#include "glib-compat.h"
#ifdef _WIN32
@@ -51,15 +51,6 @@
#include <dirent.h>
#include <netdb.h>
#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 +60,6 @@
#endif
#else
#ifdef __linux__
-#include <pty.h>
-
#include <linux/ppdev.h>
#include <linux/parport.h>
#endif
@@ -90,7 +79,6 @@
#include <stropts.h>
#endif
#endif
-#endif
#include "qemu/sockets.h"
#include "ui/qemu-spice.h"
@@ -54,7 +54,6 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/wait.h>
-#include <pty.h>
#include <math.h>
#include "ui/console.h"