summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/vtty/files/0001-vtty_write-with-size_t-counts-for-v6.6.patch32
-rw-r--r--sys-kernel/vtty/files/0002-remove-no_llseek-for-v6.12.patch31
-rw-r--r--sys-kernel/vtty/files/vtty-tty_operations.patch13
-rw-r--r--sys-kernel/vtty/vtty-0_p20230917-r1.ebuild (renamed from sys-kernel/vtty/vtty-0_p20230917.ebuild)5
4 files changed, 66 insertions, 15 deletions
diff --git a/sys-kernel/vtty/files/0001-vtty_write-with-size_t-counts-for-v6.6.patch b/sys-kernel/vtty/files/0001-vtty_write-with-size_t-counts-for-v6.6.patch
new file mode 100644
index 0000000..49dc6ba
--- /dev/null
+++ b/sys-kernel/vtty/files/0001-vtty_write-with-size_t-counts-for-v6.6.patch
@@ -0,0 +1,32 @@
+From c5d9c7c52b958fa62c1a8680e9bf5c1170bfa03d Mon Sep 17 00:00:00 2001
+From: Terin Stock <terin@terinstock.com>
+Date: Sun, 5 Jan 2025 19:50:24 +0100
+Subject: [PATCH 1/2] vtty_write with size_t counts for v6.6
+
+As of Linux v6.6 the definition for tty_operations::write uses size_t to
+unify with other tty_operations.
+
+Signed-off-by: Terin Stock <terin@terinstock.com>
+---
+ vtty.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/vtty.c b/vtty.c
+index b3c6c65..e086bd1 100644
+--- a/vtty.c
++++ b/vtty.c
+@@ -105,7 +105,11 @@ static void vtty_close(struct tty_struct *tty, struct file *filp)
+ return;
+ }
+
++#if LINUX_VERSION_CODE > KERNEL_VERSION(6,6,0)
++static ssize_t vtty_write(struct tty_struct *tty, const u8 *buf, size_t count)
++#else
+ static int vtty_write(struct tty_struct *tty, const unsigned char *buf, int count)
++#endif
+ {
+ // the TTY layer manages -EAGAIN and (non-)blocking writes
+ struct vtty_port *port = &ports[tty->index];
+--
+2.45.2
+
diff --git a/sys-kernel/vtty/files/0002-remove-no_llseek-for-v6.12.patch b/sys-kernel/vtty/files/0002-remove-no_llseek-for-v6.12.patch
new file mode 100644
index 0000000..19f3437
--- /dev/null
+++ b/sys-kernel/vtty/files/0002-remove-no_llseek-for-v6.12.patch
@@ -0,0 +1,31 @@
+From 7ab72cec2dbb59f0963d55f27cbc57025fc6f579 Mon Sep 17 00:00:00 2001
+From: Terin Stock <terin@terinstock.com>
+Date: Sun, 5 Jan 2025 19:51:05 +0100
+Subject: [PATCH 2/2] remove no_llseek for v6.12
+
+As of Linux v6.0 all calls to ->llseek are called through vfs_llseek and
+setting no_llseek is equivalent to leaving it as NULL. The definition of
+no_llseek was removed in v6.12.
+
+Signed-off-by: Terin Stock <terin@terinstock.com>
+---
+ vtty.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/vtty.c b/vtty.c
+index e086bd1..7931cde 100644
+--- a/vtty.c
++++ b/vtty.c
+@@ -684,7 +684,9 @@ static long vtmx_ioctl(struct file * filp, unsigned int cmd, unsigned long arg)
+
+ static struct file_operations vtmx_fops = {
+ .owner = THIS_MODULE,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
+ .llseek = no_llseek,
++#endif
+ .read = vtmx_read,
+ .write = vtmx_write,
+ .poll = vtmx_poll,
+--
+2.45.2
+
diff --git a/sys-kernel/vtty/files/vtty-tty_operations.patch b/sys-kernel/vtty/files/vtty-tty_operations.patch
deleted file mode 100644
index 6974fe0..0000000
--- a/sys-kernel/vtty/files/vtty-tty_operations.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/vtty.c b/vtty.c
-index b3c6c65..6aef89a 100644
---- a/vtty.c
-+++ b/vtty.c
-@@ -105,7 +105,7 @@ static void vtty_close(struct tty_struct *tty, struct file *filp)
- return;
- }
-
--static int vtty_write(struct tty_struct *tty, const unsigned char *buf, int count)
-+static ssize_t vtty_write(struct tty_struct *tty, const u8 *buf, size_t count)
- {
- // the TTY layer manages -EAGAIN and (non-)blocking writes
- struct vtty_port *port = &ports[tty->index];
diff --git a/sys-kernel/vtty/vtty-0_p20230917.ebuild b/sys-kernel/vtty/vtty-0_p20230917-r1.ebuild
index 8419b74..a59aa5c 100644
--- a/sys-kernel/vtty/vtty-0_p20230917.ebuild
+++ b/sys-kernel/vtty/vtty-0_p20230917-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -18,7 +18,8 @@ RDEPEND="virtual/udev"
DEPEND="${RDEPEND}"
PATCHES=(
- "${FILESDIR}"/vtty-tty_operations.patch
+ "${FILESDIR}"/0001-vtty_write-with-size_t-counts-for-v6.6.patch
+ "${FILESDIR}"/0002-remove-no_llseek-for-v6.12.patch
)
src_compile() {