]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
allow compilation against 2.5 headers nfs-utils-1-1-0-pre10
authorneilbrown <neilbrown>
Thu, 3 Jul 2003 02:09:15 +0000 (02:09 +0000)
committerneilbrown <neilbrown>
Thu, 3 Jul 2003 02:09:15 +0000 (02:09 +0000)
ChangeLog
support/include/nfs/nfs.h

index 5ea42f9b4f3a5de34b5a2ca0f8cf2f26dc6486b0..62877667d8d03b578ba4f712189e861d9d32868b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-07-03 NeilBrown <neilb@cse.unsw.edu.au>
+
+       * support/include/nfs/nfs.h: Make sure correct __kernel_dev_t is
+       used as the size was changed somewhere in 2.5.60-2.5.70.  Without
+       this nfs-utils compiles against 2.6 headers will not work on a
+       2.4 kernel.     
+       
 2003-07-03 NeilBrown <neilb@cse.unsw.edu.au>
 
        * support/nfs/nfssvc.c(nfssvc): If /proc/fs/nfs/threads exists,
index 937c1be633eeabb65555dd86b5d12ce039a782e1..c7fc42cb8be55f6d1106d3449fed7d3b1f21477d 100644 (file)
@@ -58,11 +58,22 @@ struct nfsctl_client {
        unsigned char           cl_fhkey[NFSCLNT_KEYMAX];
 };
 
+/* IN 2.5.6? __kernel_dev_t changed size, and __kernel_old_dev_t was left
+ * with the old value.  We need to make sure we use the right one.
+ *
+ */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,70)
+# define __nfsd_dev_t  __kernel_old_dev_t
+#else
+# define __nfsd_dev_t  __kernel_dev_t
+#endif
+
 /* EXPORT/UNEXPORT */
 struct nfsctl_export {
        char                    ex_client[NFSCLNT_IDMAX+1];
        char                    ex_path[NFS_MAXPATHLEN+1];
-       __kernel_dev_t          ex_dev;
+       __nfsd_dev_t            ex_dev;
        __kernel_ino_t          ex_ino;
        int                     ex_flags;
        __kernel_uid_t          ex_anon_uid;
@@ -83,7 +94,7 @@ struct nfsctl_uidmap {
 /* GETFH */
 struct nfsctl_fhparm {
        struct sockaddr         gf_addr;
-       __kernel_dev_t          gf_dev;
+       __nfsd_dev_t            gf_dev;
        __kernel_ino_t          gf_ino;
        int                     gf_version;
 };