Package: ftpfs
Version: 0.6.2
Author: Guillem Jover <guillem@hadrons.org>
Status: applied
Description:
 Fix compilation with kernels with modversions enabled.

diff -Naur ftpfs-0.6.2/ftpfs/cache.c ftpfs-0.6.2-patched/ftpfs/cache.c
--- ftpfs-0.6.2/ftpfs/cache.c	2001-08-08 10:56:21.000000000 +0200
+++ ftpfs-0.6.2-patched/ftpfs/cache.c	2003-05-24 22:53:02.000000000 +0200
@@ -1,3 +1,4 @@
+#include "ftpfs_config.h"
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
diff -Naur ftpfs-0.6.2/ftpfs/dir.c ftpfs-0.6.2-patched/ftpfs/dir.c
--- ftpfs-0.6.2/ftpfs/dir.c	2001-08-13 22:05:51.000000000 +0200
+++ ftpfs-0.6.2-patched/ftpfs/dir.c	2003-05-24 22:53:14.000000000 +0200
@@ -1,4 +1,4 @@
-#include <linux/config.h>
+#include "ftpfs_config.h"
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/ctype.h>
diff -Naur ftpfs-0.6.2/ftpfs/file.c ftpfs-0.6.2-patched/ftpfs/file.c
--- ftpfs-0.6.2/ftpfs/file.c	2001-07-25 12:39:00.000000000 +0200
+++ ftpfs-0.6.2-patched/ftpfs/file.c	2003-05-24 22:53:20.000000000 +0200
@@ -1,5 +1,4 @@
-#include <linux/version.h>
-#include <linux/config.h>
+#include "ftpfs_config.h"
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pagemap.h>
diff -Naur ftpfs-0.6.2/ftpfs/ftpfs_config.h ftpfs-0.6.2-patched/ftpfs/ftpfs_config.h
--- ftpfs-0.6.2/ftpfs/ftpfs_config.h	1970-01-01 01:00:00.000000000 +0100
+++ ftpfs-0.6.2-patched/ftpfs/ftpfs_config.h	2003-05-24 22:52:20.000000000 +0200
@@ -0,0 +1,20 @@
+#ifndef _FTPFS_CONFIG_H_
+#define _FTPFS_CONFIG_H_
+
+#include <linux/config.h>
+#include <linux/version.h>
+
+#ifndef KERNEL_VERSION
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#endif
+
+#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
+#define MODVERSIONS
+#endif
+
+#if defined(MODVERSIONS)
+#include <linux/modversions.h>
+#endif
+
+#endif
+
diff -Naur ftpfs-0.6.2/ftpfs/inode.c ftpfs-0.6.2-patched/ftpfs/inode.c
--- ftpfs-0.6.2/ftpfs/inode.c	2003-05-24 22:43:28.000000000 +0200
+++ ftpfs-0.6.2-patched/ftpfs/inode.c	2003-05-24 22:53:42.000000000 +0200
@@ -1,3 +1,4 @@
+#include "ftpfs_config.h"
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
diff -Naur ftpfs-0.6.2/ftpfs/Makefile ftpfs-0.6.2-patched/ftpfs/Makefile
--- ftpfs-0.6.2/ftpfs/Makefile	2003-05-24 22:43:28.000000000 +0200
+++ ftpfs-0.6.2-patched/ftpfs/Makefile	2003-05-24 22:44:43.000000000 +0200
@@ -8,7 +8,7 @@
 
 # makemake variables
 
-DEPENDFLAGS := -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE -D__KERNEL__ -DLINUX -DEXPORT_SYMTAB -DMODVERSIONS
+DEPENDFLAGS := -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE -D__KERNEL__ -DLINUX -DEXPORT_SYMTAB
 # -DFTPFS_DEBUG -DFTPFS_VERBOSE
 
 # C preprocessor (C, C++, FORTRAN)
diff -Naur ftpfs-0.6.2/ftpfs/proc.c ftpfs-0.6.2-patched/ftpfs/proc.c
--- ftpfs-0.6.2/ftpfs/proc.c	2003-05-24 22:43:28.000000000 +0200
+++ ftpfs-0.6.2-patched/ftpfs/proc.c	2003-05-24 22:53:50.000000000 +0200
@@ -1,5 +1,4 @@
-#include <linux/version.h>
-#include <linux/config.h>
+#include "ftpfs_config.h"
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/socket.h>
diff -Naur ftpfs-0.6.2/ftpfs/symlink.c ftpfs-0.6.2-patched/ftpfs/symlink.c
--- ftpfs-0.6.2/ftpfs/symlink.c	2001-08-05 16:31:36.000000000 +0200
+++ ftpfs-0.6.2-patched/ftpfs/symlink.c	2003-05-24 22:53:58.000000000 +0200
@@ -1,3 +1,4 @@
+#include "ftpfs_config.h"
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
