Author: sfrench Date: 2006-08-18 23:36:23 +0000 (Fri, 18 Aug 2006) New Revision: 74
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=74 Log: 2.4 build fixes for cifs Modified: branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24 branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c branches/linux-converged-for-old-kernels/fs/cifs/xattr.c Changeset: Modified: branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24 =================================================================== --- branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24 2006-08-17 21:47:38 UTC (rev 73) +++ branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24 2006-08-18 23:36:23 UTC (rev 74) @@ -3,7 +3,7 @@ # O_TARGET := cifs.o -obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o cifs_unicode.o cifsencrypt.o cifs_debug.o cifssmb.o connect.o misc.o dir.o inode.o link.o transport.o cifsfs.o file.o +obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o cifs_unicode.o cifsencrypt.o cifs_debug.o sess.o cifssmb.o connect.o misc.o dir.o inode.o link.o transport.o cifsfs.o file.o obj-m := $(O_TARGET) Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h =================================================================== --- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h 2006-08-17 21:47:38 UTC (rev 73) +++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h 2006-08-18 23:36:23 UTC (rev 74) @@ -31,6 +31,11 @@ #ifndef TRUE #define TRUE 1 #endif + +#ifndef __user +#define __user +#endif + #include <linux/version.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) #define current_fs_time(arg) CURRENT_TIME @@ -49,20 +54,22 @@ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) extern int cifs_create(struct inode *, struct dentry *, int, struct nameidata *); +extern struct dentry * cifs_lookup(struct inode *, struct dentry *, + struct nameidata *); +extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t); +extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat *); #else extern int cifs_create(struct inode *, struct dentry *, int); +extern struct dentry * cifs_lookup(struct inode *, struct dentry *); +extern int cifs_mknod(struct inode *, struct dentry *, int, int); #endif -extern struct dentry * cifs_lookup(struct inode *, struct dentry *, - struct nameidata *); extern int cifs_unlink(struct inode *, struct dentry *); extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *); -extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t); extern int cifs_mkdir(struct inode *, struct dentry *, int); extern int cifs_rmdir(struct inode *, struct dentry *); extern int cifs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); extern int cifs_revalidate(struct dentry *); -extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat *); extern int cifs_setattr(struct dentry *, struct iattr *); extern struct inode_operations cifs_file_inode_ops; Modified: branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c =================================================================== --- branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c 2006-08-17 21:47:38 UTC (rev 73) +++ branches/linux-converged-for-old-kernels/fs/cifs/netmisc.c 2006-08-18 23:36:23 UTC (rev 74) @@ -911,4 +911,28 @@ /* Convert to 100ns intervals and then add the NTFS time offset. */ return (u64) t.tv_sec * 10000000 + t.tv_nsec/100 + NTFS_TIME_OFFSET; } +#else +time_t +cifs_NTtimeToUnix(__u64 ntutc) +{ + /* BB what about the timezone? BB */ + + /* Subtract the NTFS time offset, then convert to 1s intervals. */ + u64 t; + + t = ntutc - NTFS_TIME_OFFSET; + do_div(t, 10000000); + return (time_t)t; +} + +/* Convert the Unix UTC into NT UTC. */ +__u64 +cifs_UnixTimeToNT(time_t t) +{ + __u64 dce_time; + /* Convert to 100ns intervals and then add the NTFS time offset. */ + dce_time = (__u64) t * 10000000; + dce_time += NTFS_TIME_OFFSET; + return dce_time; +} #endif Modified: branches/linux-converged-for-old-kernels/fs/cifs/xattr.c =================================================================== --- branches/linux-converged-for-old-kernels/fs/cifs/xattr.c 2006-08-17 21:47:38 UTC (rev 73) +++ branches/linux-converged-for-old-kernels/fs/cifs/xattr.c 2006-08-18 23:36:23 UTC (rev 74) @@ -20,7 +20,10 @@ */ #include <linux/fs.h> +#include <linux/version.h> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) #include <linux/posix_acl_xattr.h> +#endif #include "cifsfs.h" #include "cifspdu.h" #include "cifsglob.h"