1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

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>
This commit is contained in:
Adhemerval Zanella
2023-05-24 16:24:19 -03:00
parent 1512599694
commit 4d0fe291ae
4 changed files with 133 additions and 25 deletions

View File

@ -101,7 +101,7 @@
#endif
#ifndef F_GETLK
# ifndef __USE_FILE_OFFSET64
# if !defined __USE_FILE_OFFSET64 && __TIMESIZE != 64
# define F_GETLK 5 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
# define F_SETLKW 7 /* Set record locking info (blocking). */