fix
diff --git a/ChangeLog b/ChangeLog
index a80aba5..a33e6fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,7 @@
* Fix compile warning on 2.6.13 and later
- * Fix compilation on 2.4.*
+ * Fix compilation on old kernels
2005-08-25 Miklos Szeredi <miklos@szeredi.hu>
diff --git a/kernel/dir.c b/kernel/dir.c
index 623902c..826f444 100644
--- a/kernel/dir.c
+++ b/kernel/dir.c
@@ -16,7 +16,7 @@
#include <linux/mm.h>
#endif
#include <linux/sched.h>
-#ifdef KERNEL_2_6_8_PLUS
+#ifdef KERNEL_2_6
#include <linux/namei.h>
#endif
diff --git a/kernel/file.c b/kernel/file.c
index cce2777..0b7ee5a 100644
--- a/kernel/file.c
+++ b/kernel/file.c
@@ -734,11 +734,14 @@
else {
#ifdef KERNEL_2_6
int err = fuse_setlk(file, fl, fl->fl_flags & FL_SLEEP);
- if (err == -ENOSYS)
- err = posix_lock_file_wait(file, fl);
#else
int err = fuse_setlk(file, fl,
cmd == F_SETLKW || cmd == F_SETLKW64);
+#endif
+#ifdef KERNEL_2_6_9_PLUS
+ if (err == -ENOSYS)
+ err = posix_lock_file_wait(file, fl);
+#else
if (err == -ENOSYS)
err = 0;
#endif
diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h
index 1f30d82..8b13d65 100644
--- a/kernel/fuse_i.h
+++ b/kernel/fuse_i.h
@@ -25,6 +25,9 @@
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8)
# define KERNEL_2_6_8_PLUS
# endif
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
+# define KERNEL_2_6_9_PLUS
+# endif
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
# define KERNEL_2_6_10_PLUS
# endif
diff --git a/kernel/inode.c b/kernel/inode.c
index 4359b9a..142991c 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -199,7 +199,11 @@
return NULL;
if ((inode->i_state & I_NEW)) {
+#ifdef KERNEL_2_6_8_PLUS
inode->i_flags |= S_NOATIME|S_NOCMTIME;
+#else
+ inode->i_flags |= S_NOATIME;
+#endif
inode->i_generation = generation;
inode->i_data.backing_dev_info = &fc->bdi;
fuse_init_inode(inode, attr);