The termios struct exported by the termios.h header is used as an
argument for vshMakeStdinRaw(). The header isn't used anywhere in
tools/virsh-domain.c.
This patch adds the header to the header declaring vshMakeStdinRaw() and
removes other places in virsh.
---
tools/console.h | 4 +++-
tools/virsh-domain.c | 1 -
tools/virsh.c | 1 -
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/console.h b/tools/console.h
index 962594c..46255b8 100644
--- a/tools/console.h
+++ b/tools/console.h
@@ -1,7 +1,7 @@
/*
* console.c: A dumb serial console client
*
- * Copyright (C) 2007, 2010 Red Hat, Inc.
+ * Copyright (C) 2007, 2010, 2012 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,8 @@
# ifndef WIN32
+# include <termios.h>
+
int vshRunConsole(virDomainPtr dom,
const char *dev_name,
const char *escape_seq,
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 1f7aff7..96e62fc 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -30,7 +30,6 @@
#include <poll.h>
#include <signal.h>
#include <sys/time.h>
-#include <termios.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
diff --git a/tools/virsh.c b/tools/virsh.c
index 322f778..b4829a3 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -42,7 +42,6 @@
#include <sys/stat.h>
#include <inttypes.h>
#include <strings.h>
-#include <termios.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
--
1.8.0