X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/fa8fb4e7c3be746703fee0dd34285f462ba104ec..e758f86a63f8f463b7a4224039ea83a51810b51f:/openwrt/target/linux/package/switch/src/switch-core.h diff --git a/openwrt/target/linux/package/switch/src/switch-core.h b/openwrt/target/linux/package/switch/src/switch-core.h index c878d4786..9927e8519 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 {