]> git.neil.brown.name Git - history.git/commitdiff
[BRIDGE]: Build fix for gcc-2.95.x
authorAndrew Morton <akpm@osdl.org>
Mon, 2 Aug 2004 09:55:00 +0000 (02:55 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Mon, 2 Aug 2004 09:55:00 +0000 (02:55 -0700)
gcc-2.95.c does not support anonymous unions.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
net/bridge/br_fdb.c
net/bridge/br_private.h

index 373c05d78d0fe55ad3c63fa80512d6a7cf997745..940699997793db57f2cefdabe041cee8a94dfa88 100644 (file)
@@ -75,7 +75,7 @@ static __inline__ void fdb_delete(struct net_bridge_fdb_entry *f)
 {
        hlist_del_rcu(&f->hlist);
        if (!f->is_static)
-               list_del(&f->age_list);
+               list_del(&f->u.age_list);
 
        br_fdb_put(f);
 }
@@ -130,9 +130,11 @@ void br_fdb_cleanup(unsigned long _data)
        delay = hold_time(br);
 
        list_for_each_safe(l, n, &br->age_list) {
-               struct net_bridge_fdb_entry *f
-                       = list_entry(l, struct net_bridge_fdb_entry, age_list);
-               unsigned long expires = f->ageing_timer + delay;
+               struct net_bridge_fdb_entry *f;
+               unsigned long expires;
+
+               f = list_entry(l, struct net_bridge_fdb_entry, u.age_list);
+               expires = f->ageing_timer + delay;
 
                if (time_before_eq(expires, jiffies)) {
                        WARN_ON(f->is_static);
@@ -220,7 +222,7 @@ struct net_bridge_fdb_entry *br_fdb_get(struct net_bridge *br,
 static void fdb_rcu_free(struct rcu_head *head)
 {
        struct net_bridge_fdb_entry *ent
-               = container_of(head, struct net_bridge_fdb_entry, rcu);
+               = container_of(head, struct net_bridge_fdb_entry, u.rcu);
        kmem_cache_free(br_fdb_cache, ent);
 }
 
@@ -228,7 +230,7 @@ static void fdb_rcu_free(struct rcu_head *head)
 void br_fdb_put(struct net_bridge_fdb_entry *ent)
 {
        if (atomic_dec_and_test(&ent->use_count))
-               call_rcu(&ent->rcu, fdb_rcu_free);
+               call_rcu(&ent->u.rcu, fdb_rcu_free);
 }
 
 /*
@@ -314,7 +316,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
                                return 0;
 
                        /* move to end of age list */
-                       list_del(&fdb->age_list);
+                       list_del(&fdb->u.age_list);
                        goto update;
                }
        }
@@ -338,7 +340,7 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
        fdb->is_static = is_local;
        fdb->ageing_timer = jiffies;
        if (!is_local) 
-               list_add_tail(&fdb->age_list, &br->age_list);
+               list_add_tail(&fdb->u.age_list, &br->age_list);
 
        return 0;
 }
index 6cd11410711cbff0a716a8d1f86761e2582f9ecd..d2b2fb27ffc5680c16e6d91c690d2de6876b6fb3 100644 (file)
@@ -49,7 +49,7 @@ struct net_bridge_fdb_entry
        union {
                struct list_head        age_list;
                struct rcu_head         rcu;
-       };
+       } u;
        atomic_t                        use_count;
        unsigned long                   ageing_timer;
        mac_addr                        addr;