summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/dio/dio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/dio/dio.c b/ext/dio/dio.c
index 2542859eae..0435957f05 100644
--- a/ext/dio/dio.c
+++ b/ext/dio/dio.c
@@ -611,6 +611,8 @@ PHP_FUNCTION(dio_tcsetattr)
RETURN_FALSE;
}
+ memset(&newtio, 0, sizeof(newtio));
+ tcgetattr(f->fd, &newtio);
newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
newtio.c_iflag = IGNPAR;
newtio.c_oflag = 0;