From afcac3462afc46e581c981c55ec1b42c01f663de Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 17 Sep 2008 13:02:49 +0000 Subject: [PATCH] The number for the SLCAN line discipline can not be found in anyway but needs to be written as module alias tty-ldisc-17 slcan So we remove the annoying #error output and use the correctly defined '17' from Kernel 2.6.25+ as default. --- slcan_attach.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/slcan_attach.c b/slcan_attach.c index bfeaa8e..3d5bc55 100644 --- a/slcan_attach.c +++ b/slcan_attach.c @@ -51,15 +51,8 @@ #include #include #include -#include /* thanks for cleanup since 2.6.21 */ -//#include /* ldiscs for each arch up to 2.6.20 */ -#ifndef N_SLCAN -#error Your kernel includes do not provide the needed line discipline. -#error This is a normal behaviour for Kernel versions < v2.6.25 . -#error You might update or patch your kernel OR you can just ignore -#error this compilation failure if you do not need the slcan driver. -#endif +#define LDISC_N_SLCAN 17 /* default slcan line discipline since Kernel 2.6.25 */ void usage(char *name) { @@ -70,7 +63,7 @@ void usage(char *name) int main(int argc, char **argv) { int fd; - int ldisc = N_SLCAN; /* default */ + int ldisc = LDISC_N_SLCAN; int detach = 0; char *tty; int opt; -- 2.7.4