aboutsummaryrefslogtreecommitdiff
path: root/include/qemu-common.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-05-14 14:05:21 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-05-14 08:53:18 -0500
commit7791dba3ec10ab7daa7cfecf84c617594c9776cc (patch)
tree5f9acef2113e8f856e47bf0ad7e779fd5fbb4da1 /include/qemu-common.h
parentd8e846e17cae31bfeee49d4da8a010fad3901cd9 (diff)
downloadqemu-7791dba3ec10ab7daa7cfecf84c617594c9776cc.zip
qemu-7791dba3ec10ab7daa7cfecf84c617594c9776cc.tar.gz
qemu-7791dba3ec10ab7daa7cfecf84c617594c9776cc.tar.bz2
portability: pty.h is glibc-specific
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>
Diffstat (limited to 'include/qemu-common.h')
-rw-r--r--include/qemu-common.h12
1 files changed, 12 insertions, 0 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