diff --git a/serialport.c b/serialport.c index 7ee60db..6200083 100644 --- a/serialport.c +++ b/serialport.c @@ -34,6 +34,7 @@ #include #include #else +#include #include #include #endif @@ -700,7 +701,7 @@ enum sp_return sp_open(struct sp_port *port, enum sp_mode flags) data.term.c_oflag &= ~OFILL; #endif data.term.c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN); - data.term.c_cc[VMIN] = 0; + data.term.c_cc[VMIN] = 1; data.term.c_cc[VTIME] = 0; /* Ignore modem status lines; enable receiver; leave control lines alone on close. */