diff -uNr novfs-1.2.0.orig/novfs/inode.c novfs-1.2.0/novfs/inode.c --- novfs-1.2.0.orig/novfs/inode.c 2006-08-30 22:32:57.000000000 +0200 +++ novfs-1.2.0/novfs/inode.c 2006-10-15 16:15:58.000000000 +0200 @@ -47,7 +47,6 @@ /*===[ Include files specific to this module ]============================*/ #include "vfs.h" -#include "conf.h" /*===[ External data ]====================================================*/ @@ -129,8 +128,8 @@ unsigned long Novfs_internal_hash (struct qstr *name); -#ifdef GET_SB_HAS_STRUCT_VFSMOUNT -struct super_block * Novfs_get_sb(struct file_system_type *Fstype, int Flags, const char *Dev_name, void *Data, struct vfsmount *Mnt); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +int Novfs_get_sb(struct file_system_type *Fstype, int Flags, const char *Dev_name, void *Data, struct vfsmount *Mnt); #else struct super_block * Novfs_get_sb(struct file_system_type *Fstype, int Flags, const char *Dev_name, void *Data); #endif @@ -204,7 +203,11 @@ int Novfs_notify_change(struct dentry *dentry, struct iattr *attr); void Novfs_clear_inode(struct inode *inode); int Novfs_show_options( struct seq_file *s, struct vfsmount *m ); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +int Novfs_statfs(struct dentry *de, struct kstatfs *buf); +#else int Novfs_statfs(struct super_block *sb, struct kstatfs *buf); +#endif /* * Declared control interface functions @@ -3241,7 +3244,11 @@ } /*++======================================================================*/ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +int Novfs_statfs(struct dentry *de, struct kstatfs *buf) +#else int Novfs_statfs(struct super_block *sb, struct kstatfs *buf) +#endif /* * Arguments: sb - pointer to the super_block * buf - pointer to the statfs buffer @@ -3257,6 +3264,9 @@ *========================================================================*/ { uint64_t td, fd, te, fe; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) + struct super_block *sb = de->d_sb; +#endif UNUSED_VARIABLE(sb); @@ -3517,8 +3527,8 @@ } /*++======================================================================*/ -#ifdef GET_SB_HAS_STRUCT_VFSMOUNT -struct super_block *Novfs_get_sb(struct file_system_type *Fstype, int Flags, const char *Dev_name, void *Data, struct vfsmount *Mnt) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +int Novfs_get_sb(struct file_system_type *Fstype, int Flags, const char *Dev_name, void *Data, struct vfsmount *Mnt) #else struct super_block *Novfs_get_sb(struct file_system_type *Fstype, int Flags, const char *Dev_name, void *Data) #endif @@ -3536,10 +3546,14 @@ * *========================================================================*/ { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) + int sb; +#else struct super_block *sb; +#endif UNUSED_VARIABLE(Dev_name); -#ifdef GET_SB_HAS_STRUCT_VFSMOUNT +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) sb = get_sb_nodev(Fstype, Flags, Data, Novfs_fill_super, Mnt); #else sb = get_sb_nodev(Fstype, Flags, Data, Novfs_fill_super); diff -uNr novfs-1.2.0.orig/novfs/scope.c novfs-1.2.0/novfs/scope.c --- novfs-1.2.0.orig/novfs/scope.c 2006-08-30 22:32:57.000000000 +0200 +++ novfs-1.2.0/novfs/scope.c 2006-10-15 16:22:55.000000000 +0200 @@ -45,11 +45,10 @@ /*===[ Include files specific to this module ]============================*/ #include "vfs.h" -#include "conf.h" #define LEADER signal->leader -#ifndef TYPE_DEFINED_TASK_T +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) typedef struct task_struct task_t; #endif