3649f3cf094b18350071faef8d93e6554f53e86d
[openwrt/openwrt.git] / package / network / utils / comgt / patches / 002-termios.patch
1 --- a/comgt.c
2 +++ b/comgt.c
3 @@ -30,7 +30,7 @@
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <signal.h>
7 -#include <termio.h>
8 +#include <termios.h>
9 #include <fcntl.h>
10 #include <unistd.h>
11 #include <string.h>
12 @@ -81,7 +81,7 @@ char token[MAXTOKEN]; /* For gettoken(
13 char scriptfile[MAXPATH]; /* Script file name */
14 char scriptfilepath[MAXPATH]; /* temp storage for full path */
15 BOOL verbose=0; /* Log actions */
16 -struct termio cons, stbuf, svbuf; /* termios: svbuf=before, stbuf=while */
17 +struct termios cons, stbuf, svbuf; /* termios: svbuf=before, stbuf=while */
18 int comfd=0; /* Communication file descriptor. Defaults to stdin. */
19 char msg[STRINGL]; /* Massage messages here */
20 int preturn,returns[MAXGOSUBS];
21 @@ -926,7 +926,7 @@ void setcom(void) {
22 }
23
24 void doset(void) {
25 - struct termio console;
26 + struct termios console;
27 int a,b;
28 gettoken();
29 if(strcmp(token,"echo")==0) {