This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about sysdeps/unix/sysv/linux/fcntl.c


On 09/13/2018 03:57 PM, Hongzhi, Song wrote:
Hi all,

I have a issue on ltp relevant glibc.

https://github.com/linux-test-project/ltp/issues/395


Could someone tell how to fix it?

See the other thread.  I submitted a reply on Github us well:

`fcntl` always uses `struct flock` arguments. If you use `struct flock64`, you should be using `fcntl64`. The issue also goes away if you build with `-D_FILE_OFFSET_BITS=64` because then `struct flock` and `struct flock64` are basically identical.

The reason for the change was that there is no 32-bit version of the OFD locks and no separate `F_OFD_SETLKW` constant, and that `fcntl` defaulting to 64-bit in 32-bit mode was just too confusing. The previous/non-OFD locks did not do that.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]