Changeset 2782


Ignore:
Timestamp:
2005-12-25T22:57:14+01:00 (12 years ago)
Author:
nbd
Message:

fix kernel version detection in switch driver

Location:
trunk/openwrt/target/linux/package/switch/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/target/linux/package/switch/src/Makefile

    r2779 r2782  
    1212 
    1313obj-m   := switch-core.o switch-adm.o switch-robo.o 
     14 
     15ifeq ($(MAKING_MODULES),1) 
    1416export-objs := switch-core.o 
    1517 
    16 ifeq ($(MAKING_MODULES),1) 
    1718-include $(TOPDIR)/Rules.make 
    1819endif 
  • trunk/openwrt/target/linux/package/switch/src/switch-core.h

    r2776 r2782  
    22#define __SWITCH_CORE_H 
    33 
     4#include <linux/version.h> 
    45#include <linux/list.h> 
    56#define SWITCH_MAX_BUFSZ        4096 
     
    89#define SWITCH_MEDIA_100        2 
    910#define SWITCH_MEDIA_FD         4 
     11 
     12#ifndef KERNEL_VERSION 
     13#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) 
     14#endif 
     15 
     16#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 
     17#define LINUX_2_4 
     18#endif 
    1019 
    1120typedef int (*switch_handler)(char *buf, int nr); 
Note: See TracChangeset for help on using the changeset viewer.