Error #2 compiling Samba
Jim Duey
jduey at ccc-dcs.com
Thu Jul 12 18:22:33 GMT 2001
In source/smbd/vfs-wrap.c, function vfswrap_ftruncate() are the
following lines:
struct vfs_ops *vfs_ops = &fsp->conn->vfs_ops;
(snip)
currpos = vfs_ops->lseek(fsp, (SMB_OFF_T)0, SEEK_CUR);
(snip)
if(vfs_ops->fstat(fsp, &st)<0) {
(snip)
if(vfs_ops->lseek(fsp, len-1, SEEK_SET) != len -1) {
(snip)
if(vfs_ops->write(fsp, &c, 1)!=1) {
(snip)
if(vfs_ops->lseek(fsp, currpos, SEEK_SET) != currpos) {
The compiler errors out on these calls with the following:
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c: In function
`vfswrap_ftruncate':
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:499: too few
arguments to function
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:508: warning:
passing arg 2 of pointer to function makes integer from pointer without
a cast
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:508: too few
arguments to function
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:530: too few
arguments to function
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:534: warning:
passing arg 2 of pointer to function makes integer from pointer without
a cast
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:534: warning:
passing arg 3 of pointer to function makes pointer from integer without
a cast
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:534: too few
arguments to function
/home/jim/archive/samba-2.2.0a/source/smbd/vfs-wrap.c:539: too few
arguments to function
The prototypes for these calls are in source/include/vfs.h and are:
ssize_t (*write)(struct files_struct *fsp, int fd, char *data,
size_t n);
SMB_OFF_T (*lseek)(struct files_struct *fsp, int filedes, SMB_OFF_T
offset, int whence);
(snip)
int (*fstat)(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf);
So is this a bug in vfs-wrap.c?
Thanks,
Jim
More information about the samba-technical
mailing list