[LTP] [PATCH] syscalls/fcntl34: Use -D_FILE_OFFSET_BITS=64 for all cases

Cyril Hrubis chrubis@suse.cz
Tue Aug 16 13:30:55 CEST 2016


Hi!
> Actually both glibc and uClibc use fcntl64 by default and usually fail
> when you try to pass 32-bit flock structure to it when you use OFD
> locks. Then fcntl64 fails in fcntl_setlk64 routing while checking
> l_pid field. I checked this case on 32-bit targets: x86 and ARC.

Ah, I've missed that.


Given that the manual for fcntl() says:

  The newer system call employs a different structure for file locking,
  flock64, and corresponding commands, F_GETLK64, F_SETLK64, and
  F_SETLKW64.

I guess that the F_OFD_XXX locks should be added to this list as they
explicitly require flock64 as well. And the fix to the test would be
using struct flock64 instead of struct flock.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list