Skip to content

Commit

Permalink
Define F_SETLK64/F_SETLKW64 which are missing on bionic.
Browse files Browse the repository at this point in the history
glibc defines these unconditionally but the kernel headers only define them for 32 bit.
  • Loading branch information
khuey committed Jun 14, 2022
1 parent 5678b4b commit 20e0c15
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/preload/syscallbuf.c
Expand Up @@ -1798,13 +1798,19 @@ static long sys_fcntl(const struct syscall_info* call)
case F_SETOWN_EX:
return sys_fcntl64_own_ex(call);

#ifndef F_SETLK64
#define F_SETLK64 13
#endif
case F_SETLK64:
#if !defined(SYS_fcntl64)
/* Also uses 64-bit flock format */
case F_SETLK:
#endif
return sys_fcntl64_setlk64(call);

#ifndef F_SETLKW64
#define F_SETLKW64 14
#endif
case F_SETLKW64:
#if !defined(SYS_fcntl64)
/* Also uses 64-bit flock format */
Expand Down

0 comments on commit 20e0c15

Please sign in to comment.