fix gcc4-related bug in switch-robo
[openwrt.git] / target / linux / package / switch / src / switch-core.h
index bdf0ae1..5292469 100644 (file)
@@ -27,6 +27,7 @@ typedef struct {
 typedef struct {
        struct list_head list;
        char *name;
+       char *version;
        char *interface;
        int cpuport;
        int ports;
@@ -47,4 +48,12 @@ extern switch_vlan_config *switch_parse_vlan(switch_driver *driver, char *buf);
 extern int switch_parse_media(char *buf);
 extern int switch_print_media(char *buf, int media);
 
+static inline char *strdup(char *str)
+{
+       char *new = kmalloc(strlen(str) + 1, GFP_KERNEL);
+       strcpy(new, str);
+       return new;
+}
+
+
 #endif