From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: brad@comstyle.com
Subject: [Qemu-devel] [PATCH for-1.5] portability: pty.h is glibc-specific
Date: Tue, 14 May 2013 14:05:21 +0200 [thread overview]
Message-ID: <1368533121-30796-1-git-send-email-pbonzini@redhat.com> (raw)
This should fix building the GTK+ front-end on BSDs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/qemu-common.h | 12 ++++++++++++
qemu-char.c | 10 ----------
ui/gtk.c | 1 -
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/include/qemu-common.h b/include/qemu-common.h
index b399d85..af769f5 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 64e824d..30a2ddf 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 e12f228..7b2d2ac 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"
--
1.8.2.1
next reply other threads:[~2013-05-14 12:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 12:05 Paolo Bonzini [this message]
2013-05-14 16:10 ` [Qemu-devel] [PATCH for-1.5] portability: pty.h is glibc-specific Anthony Liguori
2013-05-14 16:15 ` Brad Smith
2013-05-14 16:28 ` Anthony Liguori
2013-05-14 16:35 ` Paolo Bonzini
2013-05-14 19:28 ` Laszlo Ersek
2013-05-14 19:59 ` Eric Blake
2013-05-14 18:30 ` Brad Smith
2013-05-14 21:06 ` Peter Maydell
2013-05-14 19:34 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368533121-30796-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=brad@comstyle.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).