Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

build: fix build on SmartOS #1593

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/unix/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,16 @@ int uv_tty_set_mode(uv_tty_t* tty, int mode) {
uv_spinlock_unlock(&termios_spinlock);

raw = tty->orig_termios;
#ifdef __sun
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
raw.c_oflag |= (ONLCR);
raw.c_cflag |= (CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
raw.c_cc[VMIN] = 1;
raw.c_cc[VTIME] = 0;
#else
cfmakeraw(&raw);
#endif /* #ifdef __sun */

/* Put terminal in raw mode after draining */
if (tcsetattr(fd, TCSADRAIN, &raw))
Expand Down