Search Linux Wireless

[PATCH] compat: add tty_set_termios only for kernel >= 2.6.27

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <juancarlosgarza@xxxxxxxxx>
Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 compat/compat-2.6.39.c        |    2 ++
 include/linux/compat-2.6.39.h |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

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 <linux/compat.h>
 #include <linux/tty.h>
 
+#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)) */
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux