X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=openwrt%2Ftarget%2Flinux%2Fpackage%2Fswitch%2Fsrc%2Fswitch-core.h;h=9927e851922d78b8d96879a762d2f457bdf3a9a4;hp=c878d47868909e596add44a9ac9fb9ef10bc31c3;hb=1069efa65ce627838735e6a0c385f9c23097e434;hpb=6f5df24ba279a82258b1b41649fee6786a85bde0 diff --git a/openwrt/target/linux/package/switch/src/switch-core.h b/openwrt/target/linux/package/switch/src/switch-core.h index c878d47868..9927e85192 100644 --- a/openwrt/target/linux/package/switch/src/switch-core.h +++ b/openwrt/target/linux/package/switch/src/switch-core.h @@ -1,6 +1,7 @@ #ifndef __SWITCH_CORE_H #define __SWITCH_CORE_H +#include #include #define SWITCH_MAX_BUFSZ 4096 @@ -8,6 +9,14 @@ #define SWITCH_MEDIA_100 2 #define SWITCH_MEDIA_FD 4 +#ifndef KERNEL_VERSION +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#define LINUX_2_4 +#endif + typedef int (*switch_handler)(char *buf, int nr); typedef struct {