Discussion:
Bug
Hardy Falk
2012-11-22 14:46:59 UTC
Permalink
Hi,
dietlibc 0.32 defines fcntl to fcntl64 if FILE_OFFSET_BITS==64.
Unfortunately, struct flock is not changed. Calling fcntl(fd,F_SETLK,
&lock) does not work as expected,
I'm checking FILE_OFFSET_BITS and using struct fcntl64 in my code, but
the #ifdef doesn't belong there.
Thanks to all contributors.
Hardy Falk
2012-12-25 00:52:16 UTC
Permalink
If _FILE_OFFSET_BITS==64,
struct flock is struct flock64 and fcntl64 is used.
Unfortunately, F_SETLK is not mapped to F_SETLK64 automatically.
In the same vein, struct rlimit cannot return limits for large files.
Does anybody know how to fix this in a portable way?
Thanks.

Loading...