diff --git a/configure.ac b/configure.ac index b28ed4a6dcd5c091ba86a7cf3b05c0c5e3834da4..7d69b8bcb488a5b7b4cd2856257a00fa2a71b109 100644 --- a/configure.ac +++ b/configure.ac @@ -353,7 +353,6 @@ AC_CHECK_SIZEOF([long]) dnl Availability of various common functions (non-fatal if missing), dnl and various less common threadsafe functions AC_CHECK_FUNCS_ONCE([\ - cfmakeraw \ fallocate \ geteuid \ getgid \ diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index 719185d99285a9e8ef190dba1e179fdab8401fa1..a903107afbb4fe88a2c3bcb18d782761f492e04a 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -31,7 +31,9 @@ # include #endif #include -#include +#ifndef WIN32 +# include +#endif #include "virfdstream.h" #include "virerror.h" @@ -1361,7 +1363,7 @@ int virFDStreamCreateFile(virStreamPtr st, false, false); } -#ifdef HAVE_CFMAKERAW +#ifndef WIN32 int virFDStreamOpenPTY(virStreamPtr st, const char *path, unsigned long long offset, @@ -1401,7 +1403,7 @@ int virFDStreamOpenPTY(virStreamPtr st, virFDStreamClose(st); return -1; } -#else /* !HAVE_CFMAKERAW */ +#else /* WIN32 */ int virFDStreamOpenPTY(virStreamPtr st, const char *path, unsigned long long offset, @@ -1413,7 +1415,7 @@ int virFDStreamOpenPTY(virStreamPtr st, oflags | O_CREAT, 0, false, false); } -#endif /* !HAVE_CFMAKERAW */ +#endif /* WIN32 */ int virFDStreamOpenBlockDevice(virStreamPtr st, const char *path, diff --git a/src/util/virfile.c b/src/util/virfile.c index 8bd03f8176be2a579f2b9472163b749b530a65ee..b3a63fa2eaa99d93df375700e870af6e9ffb37c6 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -27,7 +27,9 @@ #include #include -#include +#ifndef WIN32 +# include +#endif /* !WIN32 */ #ifdef HAVE_PTY_H /* Linux openpty */ # include diff --git a/src/util/virutil.c b/src/util/virutil.c index c14c02a8c4dd0a0268fb95fecc55de7f217d974d..7c2c5a78f663e026405985675881b5154d8d9893 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -35,7 +35,6 @@ #endif #include -#include #if WITH_DEVMAPPER # include diff --git a/tools/virsh.h b/tools/virsh.h index 903a2e53b6aacab640519390f028a590f697f2ae..fa9e54b1d1f18761d4386138781f19f1312ac7ae 100644 --- a/tools/virsh.h +++ b/tools/virsh.h @@ -23,7 +23,6 @@ #include #include #include -#include #include "internal.h" #include "virerror.h" diff --git a/tools/vsh.c b/tools/vsh.c index a36b6bfe232552f03da553951e07669d0419201e..5c8908f2409114ae036ce8d47d2ed82f3ce5f361 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -1928,21 +1928,6 @@ vshTTYRestore(vshControl *ctl G_GNUC_UNUSED) } -#if !defined(WIN32) && !defined(HAVE_CFMAKERAW) -/* provide fallback in case cfmakeraw isn't available */ -static void -cfmakeraw(struct termios *attr) -{ - attr->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP - | INLCR | IGNCR | ICRNL | IXON); - attr->c_oflag &= ~OPOST; - attr->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); - attr->c_cflag &= ~(CSIZE | PARENB); - attr->c_cflag |= CS8; -} -#endif /* !WIN32 && !HAVE_CFMAKERAW */ - - int vshTTYMakeRaw(vshControl *ctl G_GNUC_UNUSED, bool report_errors G_GNUC_UNUSED) diff --git a/tools/vsh.h b/tools/vsh.h index 960cae8df08682a2e216c82734ed3295bf65855d..174116b36910172cd9e5bc6db48dc54487707a92 100644 --- a/tools/vsh.h +++ b/tools/vsh.h @@ -23,7 +23,9 @@ #include #include #include -#include +#ifndef WIN32 +# include +#endif #include "internal.h" #include "virerror.h"