From patchwork Mon Apr 2 17:13:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10320095 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 D9C90602C8 for ; Mon, 2 Apr 2018 17:21:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB12F28A80 for ; Mon, 2 Apr 2018 17:21:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA61E28A8E; Mon, 2 Apr 2018 17:21:40 +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 66DA228A8A for ; Mon, 2 Apr 2018 17:21:40 +0000 (UTC) Received: from localhost ([::1]:50023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f339H-0001P6-5R for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Apr 2018 13:21:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f332T-0004SW-QF for qemu-devel@nongnu.org; Mon, 02 Apr 2018 13:14:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f332S-0004hN-TF for qemu-devel@nongnu.org; Mon, 02 Apr 2018 13:14:37 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:39102) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f332S-0004hB-MX for qemu-devel@nongnu.org; Mon, 02 Apr 2018 13:14:36 -0400 Received: by mail-wr0-x241.google.com with SMTP id c24so14737575wrc.6 for ; Mon, 02 Apr 2018 10:14:36 -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:in-reply-to:references; bh=NaqfdjomDrD9UQm5dU1gPY/QxlUL1yD2UjXucSUDx8s=; b=BT18fXXPKFE5KkXo4P9eJ+5cRpw9RjRfjccxTHJF85unE0zJnUWlOc703K9Y8epgvx hRFwUZmZFtn89+JHEoASv+CqenriO43QNYdzEUfFXO3ZL+6TyjeqeclMmVuGZuFtU+NQ WUaiR/x7uLPekRMZ7yLkF1tRCrO5uTZp1UO4r7xxW6uU8GbNqjB8GQxVlklD5sbgnSZ7 t/f/ByqXeoRBMnQuWrk+s8kPtuNb9df7f+E1E8Fzez6YXzi7pNaXlI8qrcZnSCZBCrVr PB5t+J+usSxiANh90Z4hyF1ZfoGgMFADvGxYZok8BI5CJbirk9sZ0I4uC9qTtzkSZtwN Qq7A== 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:in-reply-to :references; bh=NaqfdjomDrD9UQm5dU1gPY/QxlUL1yD2UjXucSUDx8s=; b=ood2fAA4Pa5dXOgQVLAJFuWc+Tv8rRBP0exfeCBKQ7AF7/kiNEnheulGPkHJmlF7cV nAtWQ7kCU+ulPpooC0eLFw1KJLg/OKscSVPJ2E1qZ3oVel/QX3RJlVEWGzcraopQ4bsr CYmJTxna1mBNqlenU4xKwYB59u4NlSsoXSvgNCs1506vPk3nbJPx6dW1Ejwm8abfsRjk cwfhWjma1qcit5U+BCbm/EwxbLAusz8x+7XVR4r9Hj4crSLpetVTHMxcmQLyYYRDOHDO i5VdNNsG4rzBPo0FAAs3Xd45kwBdqxhfXso6j6Rv9moMSveJaxsL3SuTj+aEEKXpX2c4 wtBA== X-Gm-Message-State: ALQs6tBZ0j46wvWzK6zP5MyCr2RB6XhqBN5GvoG3XOQ4IGcoha43eyV3 b3u13+5JVAKukw64VFEWV7i5/Q== X-Google-Smtp-Source: AIpwx4/fNs018aa87fEIH+Z0oV/QEtFSmzg0DiCsuQuhelj75YfON3NtfTD9kZ40ORvblL9ztY5IMw== X-Received: by 2002:a19:d89a:: with SMTP id r26-v6mr6015381lfi.25.1522689275545; Mon, 02 Apr 2018 10:14:35 -0700 (PDT) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id s87-v6sm142360lfk.69.2018.04.02.10.14.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 10:14:35 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Mon, 2 Apr 2018 10:13:53 -0700 Message-Id: <20180402171354.27706-8-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180402171354.27706-1-jcmvbkbc@gmail.com> References: <20180402171354.27706-1-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PULL 7/8] 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: Peter Maydell , Riku Voipio , Laurent Vivier , Max Filippov 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: {