io: Fix record locking contants on 32 bit arch with 64 bit default time_t (BZ#30477)
commit4d0fe291aed3a476a3b59c4ecfae9d35ac0f15e8
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 24 May 2023 19:24:19 +0000 (24 16:24 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 30 May 2023 11:53:07 +0000 (30 08:53 -0300)
treeff9e6cdae0a2296b1a7598842bd779dd3fa6d1c8
parent1512599694d0ead4394c0950525fdab09332faf5
io: Fix record locking contants on 32 bit arch with 64 bit default time_t (BZ#30477)

For architecture with default 64 bit time_t support, the kernel
does not provide LFS and non-LFS values for F_GETLK, F_GETLK, and
F_GETLK (the default value used for 64 bit architecture are used).

This is might be considered an ABI break, but the currenct exported
values is bogus anyway.

The POSIX lockf is not affected since it is aliased to lockf64,
which already uses the LFS values.

Checked on i686-linux-gnu and the new tests on a riscv32.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
io/Makefile
io/tst-fcntl-lock.c [new file with mode: 0644]
io/tst-lockf.c
sysdeps/unix/sysv/linux/bits/fcntl-linux.h