From patchwork Fri Jan 4 04:29:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: linux-user: Rewrite deprecated fnctl options From: dillona@dillona.com X-Patchwork-Id: 209362 Message-Id: <1357273746-21133-1-git-send-email-dillona@dillona.com> To: qemu-devel@nongnu.org Cc: riku.voipio@iki.fi, Dillon Amburgey Date: Thu, 3 Jan 2013 23:29:06 -0500 From: Dillon Amburgey glibc on alpha still uses these Signed-off-by: Dillon Amburgey --- linux-user/syscall.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e99adab..cb19ba1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4558,6 +4558,10 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) fl.l_start = tswapal(target_fl->l_start); fl.l_len = tswapal(target_fl->l_len); fl.l_pid = tswap32(target_fl->l_pid); + if (fl.l_type == F_SHLCK) + fl.l_type = F_RDLCK; + if (fl.l_type == F_EXLCK) + fl.l_type = F_WRLCK; unlock_user_struct(target_fl, arg, 0); ret = get_errno(fcntl(fd, host_cmd, &fl)); break;