diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-05-24 16:24:19 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-05-30 09:31:18 -0300 |
commit | 0967fb586124e1b84532fd32fc5bb201161a5e7f (patch) | |
tree | 398a4d02fd22ae8d2a23a2e4e4d09f33a72e52ce /sysdeps | |
parent | 739de21d3043f927e93490ee33f9e1b948556f5b (diff) | |
download | glibc-0967fb586124e1b84532fd32fc5bb201161a5e7f.tar.gz glibc-0967fb586124e1b84532fd32fc5bb201161a5e7f.tar.xz glibc-0967fb586124e1b84532fd32fc5bb201161a5e7f.zip |
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> (cherry picked from commit 4d0fe291aed3a476a3b59c4ecfae9d35ac0f15e8)
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h index 33ff88ce59..bfc674235d 100644 --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h @@ -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). */ |