]> git.proxmox.com Git - qemu.git/commitdiff
portability: pty.h is glibc-specific
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 May 2013 12:05:21 +0000 (14:05 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 14 May 2013 13:53:18 +0000 (08:53 -0500)
This should fix building the GTK+ front-end on BSDs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1368533121-30796-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
include/qemu-common.h
qemu-char.c
ui/gtk.c

index b399d855c1f14b3b100a13e97ffda5b8920feb1b..af769f5ad2d1718c0782f282d2793a86a601622e 100644 (file)
 #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
index 64e824d0acb1a0f773060b45c9b5f7eea0f43b93..30a2ddfb6784cce03075652efd4af595a787de8c 100644 (file)
 #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
index 841f91214619a63d3c62197dfa809a3d9b77cf86..52c3f95ffb0bcba6a74bbd0f461c97dda5a066c8 100644 (file)
--- 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"