From 05e6878c8767cf7006675d5e5a646b2f74aa88c7 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sat, 2 Jan 2016 18:38:31 +0100 Subject: allow pfinet to link using -O0 This fixes a long list of undefined references when compiling with -O0 by using static instead of extern in header files. --- pfinet/linux-src/include/net/neighbour.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pfinet/linux-src/include/net/neighbour.h') diff --git a/pfinet/linux-src/include/net/neighbour.h b/pfinet/linux-src/include/net/neighbour.h index ab79f17c..67ba3e53 100644 --- a/pfinet/linux-src/include/net/neighbour.h +++ b/pfinet/linux-src/include/net/neighbour.h @@ -207,26 +207,26 @@ extern void neigh_sysctl_unregister(struct neigh_parms *p); * is only referenced by the corresponding table. */ -extern __inline__ void neigh_release(struct neighbour *neigh) +static __inline__ void neigh_release(struct neighbour *neigh) { if (atomic_dec_and_test(&neigh->refcnt) && neigh->tbl == NULL) neigh_destroy(neigh); } -extern __inline__ struct neighbour * neigh_clone(struct neighbour *neigh) +static __inline__ struct neighbour * neigh_clone(struct neighbour *neigh) { if (neigh) atomic_inc(&neigh->refcnt); return neigh; } -extern __inline__ void neigh_confirm(struct neighbour *neigh) +static __inline__ void neigh_confirm(struct neighbour *neigh) { if (neigh) neigh->confirmed = jiffies; } -extern __inline__ struct neighbour * +static __inline__ struct neighbour * neigh_lookup(struct neigh_table *tbl, const void *pkey, struct device *dev) { struct neighbour *neigh; @@ -236,17 +236,17 @@ neigh_lookup(struct neigh_table *tbl, const void *pkey, struct device *dev) return neigh; } -extern __inline__ int neigh_is_connected(struct neighbour *neigh) +static __inline__ int neigh_is_connected(struct neighbour *neigh) { return neigh->nud_state&NUD_CONNECTED; } -extern __inline__ int neigh_is_valid(struct neighbour *neigh) +static __inline__ int neigh_is_valid(struct neighbour *neigh) { return neigh->nud_state&NUD_VALID; } -extern __inline__ int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) +static __inline__ int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) { neigh->used = jiffies; if (!(neigh->nud_state&(NUD_CONNECTED|NUD_DELAY|NUD_PROBE))) @@ -254,13 +254,13 @@ extern __inline__ int neigh_event_send(struct neighbour *neigh, struct sk_buff * return 0; } -extern __inline__ void neigh_table_lock(struct neigh_table *tbl) +static __inline__ void neigh_table_lock(struct neigh_table *tbl) { atomic_inc(&tbl->lock); synchronize_bh(); } -extern __inline__ void neigh_table_unlock(struct neigh_table *tbl) +static __inline__ void neigh_table_unlock(struct neigh_table *tbl) { atomic_dec(&tbl->lock); } -- cgit v1.2.3