From: Miklos Szeredi Date: Tue, 29 Nov 2005 11:29:44 +0000 (+0000) Subject: compile fixes X-Git-Tag: fuse_2_5_0_pre1~7 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bb4b97418d17f0b2ba77c888accf547685832fda;p=qemu-gpiodev%2Flibfuse.git compile fixes --- diff --git a/kernel/dir.c b/kernel/dir.c index 7e92f67..b2fbca2 100644 --- a/kernel/dir.c +++ b/kernel/dir.c @@ -1208,7 +1208,11 @@ static int fuse_removexattr(struct dentry *entry, const char *name) #endif static struct inode_operations fuse_dir_inode_operations = { +#ifdef KERNEL_2_6 .lookup = fuse_lookup, +#else + .lookup = fuse_lookup_2_4, +#endif .mkdir = fuse_mkdir, .symlink = fuse_symlink, .unlink = fuse_unlink, diff --git a/kernel/file.c b/kernel/file.c index 8187b10..a4cc04d 100644 --- a/kernel/file.c +++ b/kernel/file.c @@ -16,6 +16,12 @@ #define PageUptodate(page) Page_Uptodate(page) #define clear_page_dirty(page) ClearPageDirty(page) #endif +#ifndef KERNEL_2_6_11_PLUS +static inline loff_t page_offset(struct page *page) +{ + return ((loff_t)page->index) << PAGE_CACHE_SHIFT; +} +#endif static struct file_operations fuse_direct_io_file_operations; static int fuse_send_open(struct inode *inode, struct file *file, int isdir, diff --git a/kernel/inode.c b/kernel/inode.c index bb61b7d..1d56566 100644 --- a/kernel/inode.c +++ b/kernel/inode.c @@ -290,7 +290,9 @@ static void convert_fuse_statfs(struct kstatfs *stbuf, struct fuse_kstatfs *attr { stbuf->f_type = FUSE_SUPER_MAGIC; stbuf->f_bsize = attr->bsize; +#ifdef KERNEL_2_6 stbuf->f_frsize = attr->frsize; +#endif stbuf->f_blocks = attr->blocks; stbuf->f_bfree = attr->bfree; stbuf->f_bavail = attr->bavail;