diff --git a/src/conio/ansi_cio.c b/src/conio/ansi_cio.c
index cc581291869e48671a58a081bd1e5ab9852558a1..b04bb00b03a03c226a832fcd9f87ecbdf1f8e3da 100644
--- a/src/conio/ansi_cio.c
+++ b/src/conio/ansi_cio.c
@@ -163,6 +163,18 @@ tODKeySequence aKeySequences[] =
    {"",0}
 };
 
+#ifdef NEEDS_CFMAKERAW
+void
+cfmakeraw(struct termios *t)
+{
+	t->c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
+	t->c_oflag &= ~OPOST;
+	t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+	t->c_cflag &= ~(CSIZE|PARENB);
+	t->c_cflag |= CS8;
+}
+#endif
+
 void ansi_sendch(char ch)
 {
 	if(!ch)