1 #ifndef LINUX_26_39_COMPAT_H
2 #define LINUX_26_39_COMPAT_H
4 #include <linux/version.h>
6 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
11 * This is not part of The 2.6.37 kernel yet but we
12 * we use it to optimize the backport code we
13 * need to implement. Instead of using ifdefs
14 * to check what version of the check we use
15 * we just replace all checks on current code
16 * with this. I'll submit this upstream too, that
17 * way all we'd have to do is to implement this
18 * for older kernels, then we would not have to
19 * edit the upstrema code for backport efforts.
21 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
22 #define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT)
24 #define br_port_exists(dev) (dev->br_port)
27 #define tiocmget(tty) tiocmget(tty, NULL)
28 #define tiocmset(tty, set, clear) tiocmset(tty, NULL, set, clear)
30 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
31 extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
32 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */
34 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
36 #endif /* LINUX_26_39_COMPAT_H */