fix: don't use cfsetspeed, use i and o variants

cfsetspeed is not available on SunOS, use cfsetispeed and cfsetospeed
instead.
This commit is contained in:
Claes Nästén 2021-12-06 07:53:14 +01:00
parent 435dd04bdb
commit 05f9f63f24

View File

@ -198,7 +198,9 @@ static void init_termios(struct termios *termios) FUNC_ATTR_NONNULL_ALL
termios->c_cflag = CS8|CREAD;
termios->c_lflag = ISIG|ICANON|IEXTEN|ECHO|ECHOE|ECHOK;
cfsetspeed(termios, 38400);
// not using cfsetspeed, not available on all platforms
cfsetispeed(termios, 38400);
cfsetospeed(termios, 38400);
#ifdef IUTF8
termios->c_iflag |= IUTF8;