--- zzzz-none-000/linux-2.6.28.10/include/linux/netfilter.h 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/include/linux/netfilter.h 2010-03-23 16:43:26.000000000 +0000 @@ -299,10 +299,10 @@ #include extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); +#ifdef CONFIG_NF_NAT_NEEDED static inline void nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) { -#ifdef CONFIG_NF_NAT_NEEDED void (*decodefn)(struct sk_buff *, struct flowi *); if (family == AF_INET) { @@ -312,8 +312,15 @@ decodefn(skb, fl); rcu_read_unlock(); } -#endif } +#else +static inline void +nf_nat_decode_session(struct sk_buff *skb __attribute__ ((unused)), + struct flowi *fl __attribute__ ((unused)), + u_int8_t family __attribute__ ((unused))) +{ +} +#endif #ifdef CONFIG_PROC_FS #include @@ -323,24 +330,31 @@ #else /* !CONFIG_NETFILTER */ #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) -static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook, - struct sk_buff *skb, - struct net_device *indev, - struct net_device *outdev, - int (*okfn)(struct sk_buff *), int thresh, - int cond) +static inline int nf_hook_thresh(u_int8_t pf __attribute__ ((unused)), + unsigned int hook __attribute__ ((unused)), + struct sk_buff *skb, + struct net_device *indev __attribute__ ((unused)), + struct net_device *outdev __attribute__ ((unused)), + int (*okfn)(struct sk_buff *) __attribute__ ((unused)), + int thresh __attribute__ ((unused)), + int cond __attribute__ ((unused))) { return okfn(skb); } -static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb, - struct net_device *indev, struct net_device *outdev, - int (*okfn)(struct sk_buff *)) +static inline int nf_hook(u_int8_t pf __attribute__ ((unused)), + unsigned int hook __attribute__ ((unused)), + struct sk_buff *skb __attribute__ ((unused)), + struct net_device *indev __attribute__ ((unused)), + struct net_device *outdev __attribute__ ((unused)), + int (*okfn)(struct sk_buff *) __attribute__ ((unused))) { return 1; } struct flowi; static inline void -nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) +nf_nat_decode_session(struct sk_buff *skb __attribute__ ((unused)), + struct flowi *fl __attribute__ ((unused)), + u_int8_t family __attribute__ ((unused))) { } #endif /*CONFIG_NETFILTER*/ @@ -350,7 +364,8 @@ extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); extern void (*nf_ct_destroy)(struct nf_conntrack *); #else -static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} +static inline void nf_ct_attach(struct sk_buff *new __attribute__ ((unused)), + struct sk_buff *skb __attribute__ ((unused))) {} #endif #endif /*__KERNEL__*/