diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-01-02 18:38:31 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-02 18:48:57 +0100 |
commit | 05e6878c8767cf7006675d5e5a646b2f74aa88c7 (patch) | |
tree | 3cba4a57d98573761d4538f6a24f1be1c2b2c197 /pfinet/linux-src/net/ipv4 | |
parent | 5714421bb1d066abebc7e993bdf06e655b879b3a (diff) |
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.
Diffstat (limited to 'pfinet/linux-src/net/ipv4')
-rw-r--r-- | pfinet/linux-src/net/ipv4/fib_hash.c | 10 | ||||
-rw-r--r-- | pfinet/linux-src/net/ipv4/fib_semantics.c | 4 | ||||
-rw-r--r-- | pfinet/linux-src/net/ipv4/ip_fragment.c | 6 | ||||
-rw-r--r-- | pfinet/linux-src/net/ipv4/tcp_input.c | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/pfinet/linux-src/net/ipv4/fib_hash.c b/pfinet/linux-src/net/ipv4/fib_hash.c index e3987eac..074a3687 100644 --- a/pfinet/linux-src/net/ipv4/fib_hash.c +++ b/pfinet/linux-src/net/ipv4/fib_hash.c @@ -135,12 +135,12 @@ static __inline__ struct fib_node * fz_chain(fn_key_t key, struct fn_zone *fz) return fz->fz_hash[fn_hash(key, fz).datum]; } -extern __inline__ int fn_key_eq(fn_key_t a, fn_key_t b) +static __inline__ int fn_key_eq(fn_key_t a, fn_key_t b) { return a.datum == b.datum; } -extern __inline__ int fn_key_leq(fn_key_t a, fn_key_t b) +static __inline__ int fn_key_leq(fn_key_t a, fn_key_t b) { return a.datum <= b.datum; } @@ -677,7 +677,7 @@ FTprint("tb(%d)_delete: %d %08x/%d %d\n", tb->tb_id, r->rtm_type, rta->rta_dst ? return -ESRCH; } -extern __inline__ int +static __inline__ int fn_flush_list(struct fib_node ** fp, int z, struct fn_hash *table) { int found = 0; @@ -763,7 +763,7 @@ static int fn_hash_get_info(struct fib_table *tb, char *buffer, int first, int c #ifdef CONFIG_RTNETLINK -extern __inline__ int +static __inline__ int fn_hash_dump_bucket(struct sk_buff *skb, struct netlink_callback *cb, struct fib_table *tb, struct fn_zone *fz, @@ -788,7 +788,7 @@ fn_hash_dump_bucket(struct sk_buff *skb, struct netlink_callback *cb, return skb->len; } -extern __inline__ int +static __inline__ int fn_hash_dump_zone(struct sk_buff *skb, struct netlink_callback *cb, struct fib_table *tb, struct fn_zone *fz) diff --git a/pfinet/linux-src/net/ipv4/fib_semantics.c b/pfinet/linux-src/net/ipv4/fib_semantics.c index b7edb29b..ac763317 100644 --- a/pfinet/linux-src/net/ipv4/fib_semantics.c +++ b/pfinet/linux-src/net/ipv4/fib_semantics.c @@ -113,7 +113,7 @@ void fib_release_info(struct fib_info *fi) } } -extern __inline__ int nh_comp(const struct fib_info *fi, const struct fib_info *ofi) +static __inline__ int nh_comp(const struct fib_info *fi, const struct fib_info *ofi) { const struct fib_nh *onh = ofi->fib_nh; @@ -134,7 +134,7 @@ extern __inline__ int nh_comp(const struct fib_info *fi, const struct fib_info * return 0; } -extern __inline__ struct fib_info * fib_find_info(const struct fib_info *nfi) +static __inline__ struct fib_info * fib_find_info(const struct fib_info *nfi) { for_fib_info() { if (fi->fib_nhs != nfi->fib_nhs) diff --git a/pfinet/linux-src/net/ipv4/ip_fragment.c b/pfinet/linux-src/net/ipv4/ip_fragment.c index f066e607..f9035384 100644 --- a/pfinet/linux-src/net/ipv4/ip_fragment.c +++ b/pfinet/linux-src/net/ipv4/ip_fragment.c @@ -79,19 +79,19 @@ struct ipq *ipq_hash[IPQ_HASHSZ]; atomic_t ip_frag_mem = ATOMIC_INIT(0); /* Memory used for fragments */ /* Memory Tracking Functions. */ -extern __inline__ void frag_kfree_skb(struct sk_buff *skb) +static __inline__ void frag_kfree_skb(struct sk_buff *skb) { atomic_sub(skb->truesize, &ip_frag_mem); kfree_skb(skb); } -extern __inline__ void frag_kfree_s(void *ptr, int len) +static __inline__ void frag_kfree_s(void *ptr, int len) { atomic_sub(len, &ip_frag_mem); kfree(ptr); } -extern __inline__ void *frag_kmalloc(int size, int pri) +static __inline__ void *frag_kmalloc(int size, int pri) { void *vp = kmalloc(size, pri); diff --git a/pfinet/linux-src/net/ipv4/tcp_input.c b/pfinet/linux-src/net/ipv4/tcp_input.c index e2dfc156..9fd25b86 100644 --- a/pfinet/linux-src/net/ipv4/tcp_input.c +++ b/pfinet/linux-src/net/ipv4/tcp_input.c @@ -210,7 +210,7 @@ static __inline__ void tcp_bound_rto(struct tcp_opt *tp) } /* WARNING: this must not be called if tp->saw_timestamp was false. */ -extern __inline__ void tcp_replace_ts_recent(struct sock *sk, struct tcp_opt *tp, +static __inline__ void tcp_replace_ts_recent(struct sock *sk, struct tcp_opt *tp, __u32 start_seq, __u32 end_seq) { /* It is start_seq <= last_ack_seq combined @@ -236,7 +236,7 @@ extern __inline__ void tcp_replace_ts_recent(struct sock *sk, struct tcp_opt *tp #define PAWS_24DAYS (HZ * 60 * 60 * 24 * 24) -extern __inline__ int tcp_paws_discard(struct tcp_opt *tp, struct tcphdr *th, unsigned len) +static __inline__ int tcp_paws_discard(struct tcp_opt *tp, struct tcphdr *th, unsigned len) { return ((s32)(tp->rcv_tsval - tp->ts_recent) < 0 && (s32)(tcp_time_stamp - tp->ts_recent_stamp) < PAWS_24DAYS && @@ -259,7 +259,7 @@ static int __tcp_sequence(struct tcp_opt *tp, u32 seq, u32 end_seq) } /* This functions checks to see if the tcp header is actually acceptable. */ -extern __inline__ int tcp_sequence(struct tcp_opt *tp, u32 seq, u32 end_seq) +static __inline__ int tcp_sequence(struct tcp_opt *tp, u32 seq, u32 end_seq) { if (seq == tp->rcv_nxt) return (tp->rcv_wnd || (end_seq == seq)); |