From 9ac57fa55de7da183e4aa85f9e64306acb1b9c06 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Thu, 25 May 2023 14:26:10 +0000 Subject: [PATCH] Merge branch 'v6.1-fixups' into 'master' tty/module.c: fixups for linux >= v6.1 See merge request etherlab.org/ethercat!68 (cherry picked from commit f8c9ec6e488da981d22fe51de1d63b78e9aa8416) bbb16b87 tty/module.c: adapt signature of ->set_termios method to v6.1 d39b4a59 tty/module.c: include proper header for INIT_C_CC definition --- tty/module.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tty/module.c b/tty/module.c index fd843259..9c88365c 100644 --- a/tty/module.c +++ b/tty/module.c @@ -45,6 +45,10 @@ #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) +#include +#endif + #include "../master/globals.h" #include "../include/ectty.h" @@ -634,8 +638,13 @@ static int ec_tty_ioctl(struct tty_struct *tty, /*****************************************************************************/ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) +static void ec_tty_set_termios(struct tty_struct *tty, + const struct ktermios *old_termios) +#else static void ec_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios) +#endif { ec_tty_t *t = (ec_tty_t *) tty->driver_data; int ret;