From patchwork Sun Apr 1 20:38:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10319229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8685160380 for ; Sun, 1 Apr 2018 20:39:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7748F28DD0 for ; Sun, 1 Apr 2018 20:39:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A24728E45; Sun, 1 Apr 2018 20:39:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 10FDD28DD0 for ; Sun, 1 Apr 2018 20:39:34 +0000 (UTC) Received: from localhost ([::1]:33433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2jlF-00084C-9V for patchwork-qemu-devel@patchwork.kernel.org; Sun, 01 Apr 2018 16:39:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2jkA-0007F0-Vg for qemu-devel@nongnu.org; Sun, 01 Apr 2018 16:38:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2jkA-0004i4-8q for qemu-devel@nongnu.org; Sun, 01 Apr 2018 16:38:27 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:39205) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2jkA-0004he-19 for qemu-devel@nongnu.org; Sun, 01 Apr 2018 16:38:26 -0400 Received: by mail-lf0-x243.google.com with SMTP id p142-v6so18286496lfd.6 for ; Sun, 01 Apr 2018 13:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=NaqfdjomDrD9UQm5dU1gPY/QxlUL1yD2UjXucSUDx8s=; b=oUPN7lJkoTtPFyCqwcdcjrC7hyRHRXkGJwlWcgV7Foh4X9vAh1excxHfNH2kPTG2af 9U54HVCUpIlAcxj/s0Kyn6zdR6rmmXYJ8tL7gI7/aCeq73s9Gj5Fv6RzTklYf+hD1ol7 Vd2hDbg0boH1NxB09iUbNejVydewfZ/7QoFj7a++geRr6RYfmh1cX9vPK5vam/K7vrwO v1RgNrz7ObC+y7MoYVrgEjREITY46fnSX3HcsgW5sxIZCX6iYEevD2L3FUblQEaxJGrF Xrzgvn3IQ2Nj2UNzH6k1f47yump+6YCBwYom9P5BLKfaC0TUpdVP4AeEit6yW36ST3rv uETA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NaqfdjomDrD9UQm5dU1gPY/QxlUL1yD2UjXucSUDx8s=; b=lP9roJLMUNJhuQq1sWZYDaW3HqjKxwk19hKNk+BgzTq5OcG8Zvs0hvnswvMKS5m2rl qhMiVw6e2H84S9pHASQMrAS56R3Vo7wu8qwYoGBrXtDNEGqvL4Fp9JPT4D8flQG8dnbN ZhrIhpQrmmmgdCK+3oOwX3NzukktVTJzQnaPmG8hz/fS5x165NVT2UWqIKYTfZ4pWw6P Te7Pl5iEZh+ghxXwtMIZ/v000atyBMrVHWO9CHGEXcLALL+rlozCXocTG8gPI6RkgOw2 SWBqo2xoA2+1hhtg20/OZ+qWTOFp/io3SoQGdTMTQW8JeBB/Z8KAHNQ8/tCRlog6sYsG KQCw== X-Gm-Message-State: AElRT7E9rO256iwAE4pDB9X0RDyoUOcszjH9fIyMDGb3a85kdIoyGmz9 xMeB9G5gym1xErMk3lIOzLiUzQ== X-Google-Smtp-Source: AIpwx49gD3iOoFlsOI0mLh8hNs+suYIJiScRDkozZOoP6pcUBarmJQaetp4stVLyta6fXAuyfOKPQw== X-Received: by 10.46.145.4 with SMTP id m4mr4170715ljg.73.1522615104639; Sun, 01 Apr 2018 13:38:24 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net. (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id 31-v6sm2664061lfs.57.2018.04.01.13.38.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Apr 2018 13:38:24 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Sun, 1 Apr 2018 13:38:11 -0700 Message-Id: <20180401203811.31714-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::243 Subject: [Qemu-devel] [PATCH] linux-user: implement clock_settime X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This fixes glibc testsuite test rt/tst-clock2. Signed-off-by: Max Filippov --- linux-user/syscall.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 52e2f9c16479..924fd68efcdd 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11878,6 +11878,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, goto unimplemented_nowarn; #endif +#ifdef TARGET_NR_clock_settime + case TARGET_NR_clock_settime: + { + struct timespec ts; + + ret = target_to_host_timespec(&ts, arg2); + if (!is_error(ret)) { + ret = get_errno(clock_settime(arg1, &ts)); + } + break; + } +#endif #ifdef TARGET_NR_clock_gettime case TARGET_NR_clock_gettime: {