src: conditionally exclude cfmakeraw/termios.h on WIN32

The GNULIB termios module ensures termios.h exists (but
is none the less empty) when building for Windows. We
already exclude usage of the functions that would exist
in a real termios.h, so having an empty termios.h is
not especially useful.

It is simpler to just put all use of termios.h related
functions behind a "#ifndef WIN32" conditional.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2020-01-09 13:18:50 +00:00
parent fa434739a0
commit 7c828af858
7 changed files with 12 additions and 24 deletions

View File

@@ -23,7 +23,9 @@
#include <stdarg.h>
#include <unistd.h>
#include <sys/stat.h>
#include <termios.h>
#ifndef WIN32
# include <termios.h>
#endif
#include "internal.h"
#include "virerror.h"