]> 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:32:05 +0000 (15:32 -0300)
commit3593050c27dcf691f670fd3fa9d347c99351ed2f
treecbf3b67d11237c5ea52ccd47e18f9040c00b88f3
parente2974d26ce228f2d70827659ae6616cbead1b1c4
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