Debian Codegraph @

debian/patches/termio.patch

raw
1 From: Dave Hibberd <[email protected]>
2 Date: Tue, 16 Sep 2025 22:35:26 +0100
3 Subject: Migrate ax25ipd to termios from termio
4
5 Last-Update: 2025-09-16
6
7 Last-Update: 2025-09-16
8 ---
9 ax25ipd/io.c | 8 ++++----
10 configure.ac | 2 +-
11 2 files changed, 5 insertions(+), 5 deletions(-)
12
13 diff --git a/ax25ipd/io.c b/ax25ipd/io.c
14 index c0db51d..96bc9ca 100644
15 --- a/ax25ipd/io.c
16 +++ b/ax25ipd/io.c
17 @@ -19,7 +19,7 @@
18 #include <stdlib.h>
19 #include <string.h>
20 #include <syslog.h>
21 -#include <termio.h>
22 +#include <termios.h>
23 #include <time.h>
24 #include <unistd.h>
25 #include <arpa/inet.h>
26 @@ -32,7 +32,7 @@
27
28 #include "ax25ipd.h"
29
30 -static struct termio nterm;
31 +static struct termios nterm;
32
33 int ttyfd = -1;
34 static int udpsock = -1;
35 @@ -339,7 +339,7 @@ void io_open(void)
36 set_bpq_dev_call_and_up(ttydevice);
37 goto behind_normal_tty;
38 }
39 - if (ioctl(ttyfd, TCGETA, &nterm) < 0) {
40 + if (tcgetattr(ttyfd, &nterm) < 0) {
41 perror("fetching tty device parameters");
42 exit(1);
43 }
44 @@ -476,7 +476,7 @@ void io_open(void)
45 nterm.c_cc[VMIN] = 0;
46 nterm.c_cc[VTIME] = 0;
47
48 - if (ioctl(ttyfd, TCSETA, &nterm) < 0) {
49 + if (tcsetattr(ttyfd, TCSADRAIN, &nterm) < 0) {
50 perror("setting tty device parameters");
51 exit(1);
52 }
53 diff --git a/configure.ac b/configure.ac
54 index 623a8ed..c22f151 100644
55 --- a/configure.ac
56 +++ b/configure.ac
57 @@ -35,7 +35,7 @@ dnl Checks for header files.
58 AC_HEADER_DIRENT
59 AC_HEADER_STDC
60 AC_HEADER_SYS_WAIT
61 -AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h syslog.h termio.h unistd.h)
62 +AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h syslog.h termios.h unistd.h)
63
64 dnl Checks for typedefs, structures, and compiler characteristics.
65 AC_C_CONST