libsmbclient off_t size problem

Tom Jansen t.p.j.jansen at student.utwente.nl
Sat Oct 6 06:37:02 GMT 2001


Hi,

I've been messing around with libsmbclient from today's cvs and i've found a
nasty problem which I think originates from the configure script.
Compiling bin/libsmbclient.so after configuring works.

The problem is that within the libsmbclient.so compile the type 'off_t' is 8
bytes large. When I include <sys/types.h> in my own test.c, 'off_t' is only 4
bytes large.
I've checked this with ddd, which shows me that for example a call to
smbc_lseek(int fd, off_t offset, int whence) results in:
whence = undefined (zero in my case)
offset = offset + whence 

I don't know where to search for this problem :-( I've fixed it by replacing all
'off_t' occurences in libsmbclient.h with 'long long' but this obviously is not
a good solution.

I hope somebody can help me with this.

Yours,
	Tom Jansen

PS. I've also found segmentation fault caused by a null-pointer dereference in
lib/debug.c: 368. Changing that line to: if (dbf) x_fflush(dbf); fixed the
problem.




More information about the samba-technical mailing list