diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-07 07:55:14 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-07 07:55:14 +0000 |
commit | d836bedb4035acc61e83f1a0dc76df2c33dfc8af (patch) | |
tree | 5e320eb1118f6d35ec78d5f62a04f3c885968f83 /source3/smbwrapper/smbw_dir.c | |
parent | d2856b2dab5440e184be8d96807a08ce211f39ab (diff) | |
download | samba-d836bedb4035acc61e83f1a0dc76df2c33dfc8af.tar.gz samba-d836bedb4035acc61e83f1a0dc76df2c33dfc8af.tar.bz2 samba-d836bedb4035acc61e83f1a0dc76df2c33dfc8af.zip |
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)
Diffstat (limited to 'source3/smbwrapper/smbw_dir.c')
-rw-r--r-- | source3/smbwrapper/smbw_dir.c | 6 |
1 files changed, 5 insertions, 1 deletions
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++; } |