Subject: Re: Problem with ftruncate() ...
To: None <cagney@highland.oz.au, current-users@sun-lamp.cs.berkeley.edu>
From: None <mycroft@gnu.ai.mit.edu>
List: current-users
Date: 05/18/1994 05:18:21
any hints? Is it an error and if so has it been fixed?
The error is in your program. To wit:
status = ftruncate(fd, 6);
You *must* either have a prototype for ftruncate in scope, or explicitly
cast the argument to `off_t'. The problem is that what you're passing
to ftruncate() is an int, and it tries to read an off_t and gets 32 bits
of garbage.
------------------------------------------------------------------------------