summarylogtreecommitdiffstats
path: root/0007-kernel-6.6-struct-tty_operations-write-size_t.patch
blob: 294e819a1bbf51a1c5327e5cbada50c007b05ec8 (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
diff -pNaru5 a/ptyx/ptym.c b/ptyx/ptym.c
--- a/ptyx/ptym.c	2023-12-18 23:38:08.679181001 -0500
+++ b/ptyx/ptym.c	2023-12-18 23:38:14.429154266 -0500
@@ -229,12 +229,17 @@ static int ptyx_master_write(struct tty_
 
 	return c;
 }
 #else // greater than or equal to  2.6.10
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
 static int ptyx_master_write(struct tty_struct * tty, 
 			const unsigned char *buf, int count)
+#else
+static ssize_t ptyx_master_write(struct tty_struct * tty, 
+			const unsigned char *buf, size_t count)
+#endif
 {
 	struct ptyx_struct *ptyx_info;
 	struct tty_struct *s_tty;
 	unsigned long flags;
 	int c = 0;
diff -pNaru5 a/ptyx/ptys.c b/ptyx/ptys.c
--- a/ptyx/ptys.c	2023-12-18 23:38:08.679181001 -0500
+++ b/ptyx/ptys.c	2023-12-18 23:38:23.225780119 -0500
@@ -292,12 +292,17 @@ static int ptyx_slave_write(struct tty_s
 	ptyx_info->icount.tx += c;
 
 	return c;
 }
 #else // greater than or equal to  2.6.10
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
 static int ptyx_slave_write(struct tty_struct * tty,
 	 				const unsigned char *buf, int count)
+#else
+static ssize_t ptyx_slave_write(struct tty_struct * tty,
+	 				const unsigned char *buf, size_t count)
+#endif
 {
 	struct ptyx_struct *ptyx_info;
 	struct tty_struct *m_tty;
 	unsigned long flags;
 	int c = 0;