diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 0fc179a9a1..0956cf04a7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -236,4 +236,13 @@ # endif #endif +/* In the PowerPC64 ABI, the unadorned F_GETLK* opcodes should be used + even by largefile64 code. */ +#define FCNTL_ADJUST_CMD(__cmd) \ + ({ int cmd_ = (__cmd); \ + if (cmd_ >= F_GETLK64 && cmd_ <= F_SETLKW64) \ + cmd_ -= F_GETLK64 - F_GETLK; \ + cmd_; }) + + #endif /* linux/powerpc/powerpc64/sysdep.h */ |