rendered paste body#! /bin/sh /usr/share/dpatch/dpatch-run
## 04-kcompat-2.6.23.dpatch by Stefan Lippers-Hollmann <s.l-h@gmx.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix kernel 2.6.23 compatibility
## DP: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=20c2df83d25c6a95affe6157a4c9cac4cf5ffaac
## DP: http://sourceforge.net/mailarchive/forum.php?thread_name=87zm1d5e9u.fsf%40p4.be.48ers.dk&forum_name=squashfs-devel
@DPATCH@
diff -Nrup a/linux-2.6/inode.c b/linux-2.6/inode.c
--- a/linux-2.6/inode.c 2007-09-03 22:55:50.000000000 +0200
+++ b/linux-2.6/inode.c 2007-09-03 22:54:40.000000000 +0200
@@ -33,6 +33,10 @@
#include <linux/vmalloc.h>
#include <linux/smp_lock.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
+#include <linux/exportfs.h>
+#endif
+
#include "squashfs.h"
static void vfs_read_inode(struct inode *i);
@@ -2314,7 +2318,11 @@ static int __init init_inodecache(void)
squashfs_inode_cachep = kmem_cache_create("squashfs_inode_cache",
sizeof(struct squashfs_inode_info),
0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23))
init_once, NULL);
+#else
+ init_once);
+#endif
if (squashfs_inode_cachep == NULL)
return -ENOMEM;
return 0;