Add compatibility macro for register_sysctl_table()
PATCH 8/13 Add compatibility macro for register_sysctl_table()
The API was changed on commit 0b4d4147. register_sysctl_table() lost its last
argument.
--- compat-2.6.21.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
compat-2.6.21.h +7 -0
@@ -7,6 +7,13 @@/* Compat work for 2.6.21 */ #if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,21 )) +#include <linux/sysctl.h> + +#define register_sysctl_table (table) \ + ({ \ + register_sysctl_table((table), 0); \ + }) +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)) */ #endif /* LINUX_26_21_COMPAT_H */
Signature · 1 line
1.6.3.3.385.g60647.dirty
Luis R. Rodriguez
AppliedQuoted 5 lines · Arnaud Lacombe
The API was changed on commit
0b4d4147.register_sysctl_table()lost its last
argument.Signed-off-by Arnaud Lacombe <[email protected]>
Thanks, applied up to here fine the rest fail because your mailer line wrapped after 70 something chars. Can you try resenting 9-on using git send-email?
Luis
PATCH 1/5 Add posix SHUT_RD/SHUT_WR/SHUT_RDWR macros
In reply to Arnaud LacombeAdded on commit 91cf45f0 by Trond Myklebust in include/linux/net.h.
--- compat-2.6.24.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
compat-2.6.24.h +7 -0
@@ -10,6 +10,13 @@/* Added on 2.6.24 in include/linux/types.h by Al viro on commit 142956af */ typedef unsigned long uintptr_t ; +/* From include/linux/net.h */ +enum sock_shutdown_cmd { +SHUT_RD =0 , +SHUT_WR =1 , +SHUT_RDWR =2 , +}; +#if (LINUX_VERSION_CODE ==KERNEL_VERSION (2 ,6 ,23 ))/* Local check */ /* Added as of 2.6.24 in include/linux/skbuff.h. *
Signature · 1 line
1.6.3.3.385.g60647.dirty
PATCH 2/5 Add compatibility call for dev_get_stats()
Added on commit eeda3fd6 by Stephen Hemminger in include/linux/netdevice.h.
--- compat-2.6.29.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
compat-2.6.29.h +7 -0
@@ -6,6 +6,7 @@#if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,29 )) +#include <linux/netdevice.h> #include <linux/skbuff.h> #include <linux/usb.h>
@@ -40,6 +41,12 @@ static inline struct sk_buff *skb_queue_prev(const struct sk_buff_head *list,return skb->prev; } + +static inline struct net_device_stats *dev_get_stats (struct net_device *dev) +{ +return dev->get_stats (dev); +} +extern void usb_unpoison_anchored_urbs (struct usb_anchor *anchor);#define DIV_ROUND_CLOSEST (x, divisor)( \
Signature · 1 line
1.6.3.3.385.g60647.dirty
PATCH 3/5 Add more `skb->dst' accessors
--- compat-2.6.31.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
compat-2.6.31.h +15 -0
@@ -99,6 +99,21 @@ static inline void skb_dst_drop(struct sk_buff *skb) skb->dst =NULL ; } +static inline struct dst_entry *skb_dst (const struct sk_buff *skb) +{ +return (struct dst_entry *)skb->dst; +} + +static inline void skb_dst_set (struct sk_buff *skb,struct dst_entry *dst) +{ + skb->dst = (unsigned long )dst; +} + +static inline struct rtable *skb_rtable (const struct sk_buff *skb) +{ +return (struct rtable *)skb_dst (skb); +} +extern int genl_register_family_with_ops (struct genl_family *family,struct genl_ops *ops,size_t n_ops);
Signature · 1 line
1.6.3.3.385.g60647.dirty
PATCH 4/5 Add `enum nf_inet_hooks'
Introduced on commit 6e23ae2a by Patrick McHardy in include/linux/netfilter.h in order to factor common macro value used by IPv6 and IPv4 code.
--- compat-2.6.25.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
compat-2.6.25.h +9 -0
@@ -29,6 +29,15 @@ extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct#define seq_file_net &init_net; +enum nf_inet_hooks { +NF_INET_PRE_ROUTING =0 , +NF_INET_LOCAL_IN =1 , +NF_INET_FORWARD =2 , +NF_INET_LOCAL_OUT =3 , +NF_INET_POST_ROUTING =4 , +NF_INET_NUMHOOKS =5 +}; +/* The patch: * commit 8b5f6883683c91ad7e1af32b7ceeb604d68e2865 * Author: Marcin Slusarz <[email protected]>
Signature · 1 line
1.6.3.3.385.g60647.dirty
PATCH 5/5 Trailing space nits
--- Makefile | 4 ++-- compat-2.6.23.c | 6 +++--- compat-2.6.23.h | 2 +- compat-2.6.24.h | 2 +- compat-2.6.25.c | 2 +- compat-2.6.25.h | 2 +- compat-2.6.26.h | 16 ++++++++-------- 7 files changed, 17 insertions(+), 17 deletions(-)
Makefile +2 -2
@@ -38,8 +38,8 @@ compat-$(CONFIG_COMPAT_KERNEL_30) += compat-2.6.30.o compat-$(CONFIG_COMPAT_KERNEL_31) += compat-2.6.31.o compat-$(CONFIG_COMPAT_KERNEL_32) += compat-2.6.32.o -modules: - $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules +modules: + $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules install: modules $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \ modules_install
compat-2.6.23.c +3 -3
@@ -14,7 +14,7 @@#if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,23 ))/* Part of net/core/dev_mcast.c as of 2.6.23. This is a slightly different version. -* Since da->da_synced is not part of 2.6.22 we need to take longer route when +* Since da->da_synced is not part of 2.6.22 we need to take longer route when * syncing */ /**
@@ -70,8 +70,8 @@ int dev_mc_sync(struct net_device *to, struct net_device *from)EXPORT_SYMBOL (dev_mc_sync); -/* Part of net/core/dev_mcast.c as of 2.6.23. This is a slighty different version. -* Since da->da_synced is not part of 2.6.22 we need to take longer route when +/* Part of net/core/dev_mcast.c as of 2.6.23. This is a slighty different version. +* Since da->da_synced is not part of 2.6.22 we need to take longer route when * unsyncing */ /**
compat-2.6.23.h +1 -1
@@ -70,7 +70,7 @@ static inline void tcf_destroy_chain_compat(struct tcf_proto **fl)#define da_users dmi_users#define da_gusers dmi_gusers -/* dev_set_promiscuity() was moved to __dev_set_promiscuity() on 2.6.23 and +/* dev_set_promiscuity() was moved to __dev_set_promiscuity() on 2.6.23 and * dev_set_promiscuity() became a wrapper. */ #define __dev_set_promiscuity dev_set_promiscuity
compat-2.6.24.h +1 -1
@@ -148,7 +148,7 @@ struct header_ops { unsigned char *haddr); }; -/* net/ieee80211/ieee80211_crypt_tkip uses sg_init_table. This was added on +/* net/ieee80211/ieee80211_crypt_tkip uses sg_init_table. This was added on * 2.6.24. CONFIG_DEBUG_SG was added in 2.6.24 as well, so lets just ignore * the debug stuff. Note that adding this required changes to the struct * scatterlist on include/asm/scatterlist*, so the right way to port this
compat-2.6.25.c +1 -1
@@ -15,7 +15,7 @@/* Backport work for QoS dependencies (kernel/pm_qos_params.c) * ipw2100 now makes use of -* pm_qos_add_requirement(), +* pm_qos_add_requirement(), * pm_qos_update_requirement() and * pm_qos_remove_requirement() from it *
compat-2.6.25.h +1 -1
@@ -82,7 +82,7 @@ static inline void be64_add_cpu(__be64 *var, u64 val) *var =cpu_to_be64 (v + val); } -/* 2.6.25 changes hwrng_unregister()'s behaviour by supporting +/* 2.6.25 changes hwrng_unregister()'s behaviour by supporting * suspend of its parent device (the misc device, which is itself the * hardware random number generator). It does this by passing a parameter to * unregister_miscdev() which is not supported in older kernels. The suspend
compat-2.6.26.h +8 -8
@@ -88,19 +88,19 @@ static inline const char *dev_name(struct device *dev)return dev->bus_id; } -/* This is from include/linux/kernel.h, which was added as of 2.6.26 */ +/* This is from include/linux/kernel.h, which was added as of 2.6.26 */ /** * clamp_val - return a value clamped to a given range using val's type * @val: current value * @min: minimum allowable value * @max: maximum allowable value -* +* * This macro does no typechecking and uses temporary variables of whatever * type the input argument 'val' is. This is useful when val is an unsigned * type and min and max are literals that will otherwise be assigned a signed * integer type. -*/ +*/ #define clamp_val (val, min, max) ({ \ typeof(val) __val = (val); \
@@ -193,10 +193,10 @@ struct net *dev_net(const struct net_device *dev)* implementation. The AVR32 AP implementation can handle unaligned * words, but halfwords must be halfword-aligned, and doublewords must * be word-aligned. -* +* * However, swapped word loads must be word-aligned so we can't * optimize word loads in general. -*/ +*/ #include <linux/unaligned/be_struct.h> #include <linux/unaligned/le_byteshift.h>
@@ -213,7 +213,7 @@ struct net *dev_net(const struct net_device *dev)#ifdef CONFIG_CRIS /* -* CRIS can do unaligned accesses itself. +* CRIS can do unaligned accesses itself. */ #include <linux/unaligned/access_ok.h> #include <linux/unaligned/generic.h>
@@ -300,7 +300,7 @@ struct net *dev_net(const struct net_device *dev)#ifdef CONFIG_PPC /* * The PowerPC can do unaligned accesses itself in big endian mode. -*/ +*/ #include <linux/unaligned/access_ok.h> #include <linux/unaligned/generic.h>
@@ -308,7 +308,7 @@ struct net *dev_net(const struct net_device *dev)#ifdef CONFIG_S390 /* -* The S390 can do unaligned accesses itself. +* The S390 can do unaligned accesses itself. */ #include <linux/unaligned/access_ok.h> #include <linux/unaligned/generic.h>
Signature · 1 line
1.6.3.3.385.g60647.dirty
Re: [PATCH 1/5] Add posix SHUT_RD/SHUT_WR/SHUT_RDWR macros
In reply to Arnaud LacombeQuoted 3 lines · Arnaud Lacombe
Added on commit
91cf45f0by Trond Myklebust ininclude/linux/net.h.Signed-off-by Arnaud Lacombe <[email protected]>
Thanks, all were applied.
Luis