diff --git qemu-5.0.0.orig/linux-user/generic/fcntl.h qemu-5.0.0/linux-user/generic/fcntl.h index 9f727d4..d9a75d3 100644 --- qemu-5.0.0.orig/linux-user/generic/fcntl.h +++ qemu-5.0.0/linux-user/generic/fcntl.h @@ -104,6 +104,12 @@ #define TARGET_F_GETOWN_EX 16 #endif +#ifndef TARGET_F_OFD_GETLK +#define TARGET_F_OFD_GETLK 36 +#define TARGET_F_OFD_SETLK 37 +#define TARGET_F_OFD_SETLKW 38 +#endif + struct target_f_owner_ex { int type; /* Owner type of ID. */ int pid; /* ID of owner. */ diff --git qemu-5.0.0.orig/linux-user/strace.c qemu-5.0.0/linux-user/strace.c index 0d9095c..e54532c 100644 --- qemu-5.0.0.orig/linux-user/strace.c +++ qemu-5.0.0/linux-user/strace.c @@ -1607,6 +1607,18 @@ print_fcntl(const struct syscallname *name, qemu_log("F_NOTIFY,"); print_raw_param(TARGET_ABI_FMT_ld, arg2, 0); break; + case TARGET_F_OFD_GETLK: + qemu_log("F_OFD_GETLK,"); + print_pointer(arg2, 1); + break; + case TARGET_F_OFD_SETLK: + qemu_log("F_OFD_SETLK,"); + print_pointer(arg2, 1); + break; + case TARGET_F_OFD_SETLKW: + qemu_log("F_OFD_SETLKW,"); + print_pointer(arg2, 1); + break; default: print_raw_param(TARGET_ABI_FMT_ld, arg1, 0); print_pointer(arg2, 1); diff --git qemu-5.0.0.orig/linux-user/syscall.c qemu-5.0.0/linux-user/syscall.c index 05f0391..67b20b7 100644 --- qemu-5.0.0.orig/linux-user/syscall.c +++ qemu-5.0.0/linux-user/syscall.c @@ -6163,6 +6163,17 @@ static int target_to_host_fcntl_cmd(int cmd) case TARGET_F_GETPIPE_SZ: ret = F_GETPIPE_SZ; break; +#endif +#ifdef F_OFD_GETLK + case TARGET_F_OFD_GETLK: + ret = F_OFD_GETLK; + break; + case TARGET_F_OFD_SETLK: + ret = F_OFD_SETLK; + break; + case TARGET_F_OFD_SETLKW: + ret = F_OFD_SETLKW; + break; #endif default: ret = -TARGET_EINVAL; @@ -6363,6 +6374,9 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) switch(cmd) { case TARGET_F_GETLK: +#ifdef F_OFD_GETLK + case TARGET_F_OFD_GETLK: +#endif ret = copy_from_user_flock(&fl64, arg); if (ret) { return ret; @@ -6375,6 +6389,10 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) case TARGET_F_SETLK: case TARGET_F_SETLKW: +#ifdef F_OFD_GETLK + case TARGET_F_OFD_SETLK: + case TARGET_F_OFD_SETLKW: +#endif ret = copy_from_user_flock(&fl64, arg); if (ret) { return ret;