summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/netfilter_ipv4/ip_set_malloc.h
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu>2008-07-19 20:48:19 +0000
committer/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu>2008-07-19 20:48:19 +0000
commit6a0ae483145159b0c903690c0313dbc03745c412 (patch)
treec76f14af1d80295c94eeba826bdec75cda73ad55 /kernel/include/linux/netfilter_ipv4/ip_set_malloc.h
parent87c406c4962ea52f467b9807daf66e3652bd0e9b (diff)
Compatibility cleanup release: kernels >= 2.6.16 and 2.4.36.x are supported.
Diffstat (limited to 'kernel/include/linux/netfilter_ipv4/ip_set_malloc.h')
-rw-r--r--kernel/include/linux/netfilter_ipv4/ip_set_malloc.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_malloc.h b/kernel/include/linux/netfilter_ipv4/ip_set_malloc.h
index 30701f4..d22bed7 100644
--- a/kernel/include/linux/netfilter_ipv4/ip_set_malloc.h
+++ b/kernel/include/linux/netfilter_ipv4/ip_set_malloc.h
@@ -5,10 +5,17 @@
static size_t max_malloc_size = 0, max_page_size = 0;
-static inline bool init_max_page_size(void)
+static inline int init_max_page_size(void)
{
+/* Compatibility glues to support 2.4.36 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#define __GFP_NOWARN 0
+
+ /* Guaranteed: slab.c */
+ max_malloc_size = max_page_size = 131072;
+#else
size_t page_size = 0;
-
+
#define CACHE(x) if (max_page_size == 0 || x < max_page_size) \
page_size = x;
#include <linux/kmalloc_sizes.h>
@@ -21,6 +28,7 @@ static inline bool init_max_page_size(void)
return 1;
}
+#endif
return 0;
}