]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
Removed bad hacks in vcan.c and slcan_attach.c.
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Wed, 11 Jun 2008 16:35:19 +0000 (16:35 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Wed, 11 Jun 2008 16:35:19 +0000 (16:35 +0000)
Giving some hints for users of older kernels than 2.6.25 that a
compilation error is a normal behaviour in these cases.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@773 030b6a49-0b11-0410-94ab-b0dab22257f2

can-utils/Makefile
can-utils/slcan_attach.c
can-utils/vcan.c

index 520552d07427fbb0a1aa719e164e6bed80217df2..727f760b30518dc75f8eb7b283cb9c2564659def 100644 (file)
 #
 #  Send feedback to <socketcan-users@lists.berlios.de>
 
+MAKEFLAGS = -k
+
 CFLAGS    = -O2 -Wall -Wno-parentheses -I../kernel/2.6/include \
            -fno-strict-aliasing \
            -DPF_CAN=29 \
            -DAF_CAN=PF_CAN
 
 PROGRAMS = candump cansniffer cansend canplayer canlogserver cangen\
-          canbusload log2long log2asc asc2log slcan_attach vcan
+          canbusload log2long log2asc asc2log vcan slcan_attach
 
 all: $(PROGRAMS)
 
index 399962e7bd4de38f3f01b5f947babefc25d4f257..bfeaa8e235c854395f7fc42e0ed46e81de8fe2ae 100644 (file)
 //#include <asm/termios.h> /* ldiscs for each arch up to 2.6.20 */
 
 #ifndef N_SLCAN
-#define N_SLCAN 17 /* bad hack until it's not inside the Kernel */
+#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
 
 void usage(char *name)
index 90bd36d97919ef6d546a85c3a35b87d1a4828b9e..80d39d52b54026157b496f31594bc3682918c11d 100644 (file)
 
 #include <linux/if_link.h>
 
-#if 0
-#define IFLA_LINKINFO 18
-
-enum
-{
-       IFLA_INFO_UNSPEC,
-       IFLA_INFO_NAME,
-       IFLA_INFO_DATA,
-       IFLA_INFO_XSTATS,
-       __IFLA_INFO_MAX,
-};
+#ifndef IFLA_LINKINFO
+#error Your kernel includes do not provide the needed netlink interface function.
+#error This is a normal behaviour for Kernel versions < v2.6.24 .
+#error You don't need this tool for Kernel versions < v2.6.24 anyway, as
+#error the number of vcan driver instances can be defined as a vcan.ko module
+#error commandline parameter (default = 4) in older Kernels.
 #endif
 
 #define NLMSG_TAIL(nmsg)                                               \