Patchwork [v3] Make GTK UI build on OS X

login
register
mail settings
Submitter C.W. Betts
Date March 27, 2013, 7:20 p.m.
Message ID <BLU0-SMTP395E6918840C7A3DBEF56DB9D10@phx.gbl>
Download mbox | patch
Permalink /patch/231810/
State New
Headers show

Comments

C.W. Betts - March 27, 2013, 7:20 p.m.
From 51326a5db7e774cfe405b8cbcac7fc748857faac Mon Sep 17 00:00:00 2001
From: "C.W. Betts" <computers57@hotmail.com>
Date: Wed, 27 Mar 2013 13:19:07 -0600
Subject: [PATCH] Make the GTK UI build on OS X. Moved the terminal includes
 from qemu-char.c to qemu-common.h. Removed the terminal includes from gtk.c.

Signed-off-by: C.W. Betts <computers57@hotmail.com>
---
 include/qemu-common.h |  8 ++++++++
 qemu-char.c           | 12 ------------
 ui/gtk.c              |  1 -
 3 files changed, 8 insertions(+), 13 deletions(-)

Patch

diff --git a/include/qemu-common.h b/include/qemu-common.h
index 31fff22..08d4b46 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -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
diff --git a/qemu-char.c b/qemu-char.c
index dee623e..a4e203e 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -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"
diff --git a/ui/gtk.c b/ui/gtk.c
index a5a8156..b45706b 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -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"