summaryrefslogtreecommitdiff
path: root/third_party/ax25/patches/ax25-apps-0.0.8-termios.patch
blob: 56bdd5158169733d970d8d44b49ce1c19413aca3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
--- a/ax25ipd/io.c
+++ b/ax25ipd/io.c
@@ -19,7 +19,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
-#include <termio.h>
+#include <termios.h>
+#include <sys/ioctl.h>
 #include <time.h>
 #include <unistd.h>
 #include <arpa/inet.h>
@@ -32,7 +33,7 @@
 
 #include "ax25ipd.h"
 
-static struct termio nterm;
+static struct termios nterm;
 
 int ttyfd = -1;
 static int udpsock = -1;
@@ -339,7 +340,7 @@ int open_io(void)
 		set_bpq_dev_call_and_up(ttydevice);
 		goto behind_normal_tty;
 	}
-	if (ioctl(ttyfd, TCGETA, &nterm) < 0) {
+	if (tcgetattr(ttyfd, &nterm) < 0) {
 		perror("fetching tty device parameters");
 		exit(1);
 	}
@@ -476,7 +477,7 @@ int open_io(void)
 	nterm.c_cc[VMIN] = 0;
 	nterm.c_cc[VTIME] = 0;
 
-	if (ioctl(ttyfd, TCSETA, &nterm) < 0) {
+	if (tcsetattr(ttyfd, TCSANOW, &nterm) < 0) {
 		perror("setting tty device parameters");
 		exit(1);
 	}
--- a/ax25rtd/ax25rtd.c
+++ b/ax25rtd/ax25rtd.c
@@ -33,6 +33,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
--- a/ax25ipd/routing.c
+++ b/ax25ipd/routing.c
@@ -11,6 +11,7 @@
 #include <arpa/inet.h>
 #include <netinet/in.h>
 #include <sys/types.h>
+#include <stdlib.h>
 
 #include "ax25ipd.h"
 
--- a/call/call.c
+++ b/call/call.c
@@ -42,7 +42,7 @@
 #include <unistd.h>
 #include <wchar.h>
 #include <wctype.h>
-#include <ncursesw/ncurses.h>
+#include <ncurses.h>
 #include <locale.h>
 #include <iconv.h>
 #include <sys/ioctl.h>
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com