From d836bedb4035acc61e83f1a0dc76df2c33dfc8af Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 7 Oct 1998 07:55:14 +0000 Subject: more OSF1 changes as well as changes to allow us to use the standard includes.h in wrapped.c, thus making porting much simpler (This used to be commit 6f2239c935fdecfefa89227c113df01e3957691a) --- source3/smbwrapper/smbw_dir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/smbwrapper/smbw_dir.c') diff --git a/source3/smbwrapper/smbw_dir.c b/source3/smbwrapper/smbw_dir.c index f6d648b91f..37926b0407 100644 --- a/source3/smbwrapper/smbw_dir.c +++ b/source3/smbwrapper/smbw_dir.c @@ -20,7 +20,7 @@ */ #include "includes.h" -#include "wrapper.h" +#include "realcalls.h" extern pstring smbw_cwd; extern fstring smbw_prefix; @@ -321,15 +321,19 @@ int smbw_getdents(unsigned int fd, struct dirent *dirp, int count) } while (count>=DIRP_SIZE && (dir->offset < dir->count)) { +#if HAVE_DIRENT_D_OFF dirp->d_off = (dir->offset+1)*DIRP_SIZE; +#endif dirp->d_reclen = DIRP_SIZE; fstrcpy(&dirp->d_name[0], dir->list[dir->offset].name); dirp->d_ino = smbw_inode(dir->list[dir->offset].name); dir->offset++; count -= dirp->d_reclen; +#if HAVE_DIRENT_D_OFF if (dir->offset == dir->count) { dirp->d_off = -1; } +#endif dirp = (struct dirent *)(((char *)dirp) + DIRP_SIZE); n++; } -- cgit