]> git.ipfire.org Git - thirdparty/glibc.git/commit
io: Fix F_GETLK, F_SETLK, and F_SETLKW for powerpc64
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 30 May 2023 19:40:38 +0000 (16:40 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 31 May 2023 18:31:44 +0000 (15:31 -0300)
commitcbceb903c4d770acc7e4ba5641036516830ed69b
tree8edbc4b11fd96eecb2a8546ff5af4a8996718420
parent0967fb586124e1b84532fd32fc5bb201161a5e7f
io: Fix F_GETLK, F_SETLK, and F_SETLKW for powerpc64

Different than other 64 bit architectures, powerpc64 defines the
LFS POSIX lock constants  with values similar to 32 ABI, which
are meant to be used with fcntl64 syscall.  Since powerpc64 kABI
does not have fcntl, the constants are adjusted with the
FCNTL_ADJUST_CMD macro.

The 4d0fe291aed3a476a changed the logic of generic constants
LFS value are equal to the default values; which is now wrong
for powerpc64.

Fix the value by explicit define the previous glibc constants
(powerpc64 does not need to use the 32 kABI value, but it simplifies
the FCNTL_ADJUST_CMD which should be kept as compatibility).

Checked on powerpc64-linux-gnu and powerpc-linux-gnu.

(cherry picked from commit 5f828ff824e3b7cd133ef905b8ae25ab8a8f3d66)
sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h