Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] fix for Linux kernels >= 6.6. #53

Open
dreirund opened this issue Jan 11, 2024 · 1 comment
Open

[patch] fix for Linux kernels >= 6.6. #53

dreirund opened this issue Jan 11, 2024 · 1 comment

Comments

@dreirund
Copy link

dreirund commented Jan 11, 2024

The code needs to be updated for Linux >= 6.6:

Here is a patch that adds support for Linux >= 6.6 (needs to have the patch for Linux >= 6.1 also be added separately):

linux-6.6-fixup.patch.txt:

diff -rU1 tty0tty.linux-6.1-fixed/module/tty0tty.c tty0tty/module/tty0tty.c
--- tty0tty.linux-6.1-fixed/module/tty0tty.c	2024-01-11 20:13:27.739146823 +0100
+++ tty0tty/module/tty0tty.c	2024-01-11 20:14:35.892478188 +0100
@@ -212,4 +212,9 @@
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)
+static ssize_t tty0tty_write(struct tty_struct *tty, const unsigned char *buffer,
+			 size_t count)
+#else
 static int tty0tty_write(struct tty_struct *tty, const unsigned char *buffer,
 			 int count)
+#endif
 {

(Authorship goes to @ozz from Arch User Repository.)

linux-6.1-fixup.patch.txt:

diff -rU1 tty0tty.org/module/tty0tty.c tty0tty/module/tty0tty.c
--- tty0tty.org/module/tty0tty.c	2024-01-11 20:08:54.922488036 +0100
+++ tty0tty/module/tty0tty.c	2024-01-11 20:10:36.829151760 +0100
@@ -290,2 +290,5 @@
 static void tty0tty_set_termios(struct tty_struct *tty,
+				#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+					const
+				#endif
 				struct ktermios *old_termios)

(Note that tabulars are used!, copy & paste might transform them to whitespace which will break applying the patches.)

Regards!

@cschweers
Copy link

You should have checked the PR's first #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants