From 6e14c4a4fb52ed3d359224ccb34c04484640920d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 27 Feb 2011 14:49:44 +0100 Subject: [PATCH] compat: add tty_set_termios only for kernel >= 2.6.27 tty_set_termios does not build with older kernel versions and is only needed by bluetooth which works only for kernel >= 2.6.27. Reported-by: Juan Carlos Garza Signed-off-by: Hauke Mehrtens --- compat/compat-2.6.39.c | 2 ++ include/linux/compat-2.6.39.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/compat/compat-2.6.39.c b/compat/compat-2.6.39.c index c2966f7..8d85877 100644 --- a/compat/compat-2.6.39.c +++ b/compat/compat-2.6.39.c @@ -11,6 +11,7 @@ #include #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) /* * Termios Helper Methods */ @@ -108,4 +109,5 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios) return 0; } EXPORT_SYMBOL_GPL(tty_set_termios); +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */ diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h index 1c7b322..0c4f030 100644 --- a/include/linux/compat-2.6.39.h +++ b/include/linux/compat-2.6.39.h @@ -27,7 +27,9 @@ #define tiocmget(tty) tiocmget(tty, NULL) #define tiocmset(tty, set, clear) tiocmset(tty, NULL, set, clear) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */ #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ -- 2.41.0