From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16366 invoked from network); 3 Sep 2020 11:24:37 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Sep 2020 11:24:37 -0000 Received: (qmail 16245 invoked by uid 550); 3 Sep 2020 11:24:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 15931 invoked from network); 3 Sep 2020 11:23:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=TYXuoplCwYGSx eRn2AV4VlGBd0eaRx+vWT7O8ZCAqZ8=; b=coh7sOgY34WpT+TjFl+jLLbqXWd0I T6zFSuOcEGKrdvm5+MKc5mQEsDaTTiEwN18DwjJtU40AIHvITl55+I2xr+ZcEWbm BQsx6roRLytCbb9+oJw8VMyqv2MK/qUC2sy7IFwpFKf1pNU5oJ0XsHKvgf/Sd1el d/gGUe6NIMrBrwMO4jaqo/ulohvc6KlJ9GgKCDtmx4u4QcmAm9ZfiB2T6snSiNy0 ZniTeEMYounJhxm6Dx7yUaYXL9HF4XJ2aheppWlTQIwjWS0f/9eiN4DUKLkP5BWt /lcOSjpXczLx+BERBdQzY7NGitCK2tnTDczqD8S/8sj/JyHpGDYVrG8mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=TYXuoplCwYGSxeRn2AV4VlGBd0eaRx+vWT7O8ZCAqZ8=; b=e047g4Hg kzq94c7Zmm06xDlfh9jtaeEiVLE+50jvjqXI9785aKkDV+sKk9RqTVtywj6Ve8g+ 403FkR5XniBIK7hAotO2euv3m/g6TmYGzxi7qQ/7IO4RbYjopfEaECMzxVBCryHZ hXqbA6Q42dsf+PUvjhXqDrcwc/lir3Y7qfywyBIgQpfSt8P7uiugd4/ghSy5HAxb akv5cluWvexuFuCFAEmcWrWnWLF+Ae0bpgzf2+kYW1HTLRZgz+0BOcZ2E7R7QYsa lKOrDY2vaIYnxRNEYg4hKKjUrraiR27V6E9zib1VhfJgouo02WEAPOd3sk0zkREo v9DTM5csz0xWaQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeguddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepufhtvghfrghnucfqkdftvggrrhcuoehsohhrvggrrhesfhgr shhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpeegueehieeifeehleevgfdvfe fgtefhhedtieduhfegiefhtdfghfdtteeijeelveenucfkphepvddtledriedrudehgedr feegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsh horhgvrghrsehfrghsthhmrghilhdrtghomh X-ME-Proxy: From: Stefan O'Rear To: musl@lists.openwall.com Cc: Stefan O'Rear Date: Thu, 3 Sep 2020 07:22:59 -0400 Message-Id: <20200903112309.102601-5-sorear@fastmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200903112309.102601-1-sorear@fastmail.com> References: <20200903112309.102601-1-sorear@fastmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [musl] [PATCH 04/14] time64: Only gettimeofday/settimeofday if exist riscv64 and future architectures only provide the clock_ functions. --- src/time/clock_gettime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/time/clock_gettime.c b/src/time/clock_gettime.c index 3e1d0975..c7e66a51 100644 --- a/src/time/clock_gettime.c +++ b/src/time/clock_gettime.c @@ -80,10 +80,12 @@ int __clock_gettime(clockid_t clk, struct timespec *ts) return __syscall_ret(r); long ts32[2]; r = __syscall(SYS_clock_gettime, clk, ts32); +#ifdef SYS_gettimeofday if (r==-ENOSYS && clk==CLOCK_REALTIME) { r = __syscall(SYS_gettimeofday, ts32, 0); ts32[1] *= 1000; } +#endif if (!r) { ts->tv_sec = ts32[0]; ts->tv_nsec = ts32[1]; @@ -92,6 +94,7 @@ int __clock_gettime(clockid_t clk, struct timespec *ts) return __syscall_ret(r); #else r = __syscall(SYS_clock_gettime, clk, ts); +#ifdef SYS_gettimeofday if (r == -ENOSYS) { if (clk == CLOCK_REALTIME) { __syscall(SYS_gettimeofday, ts, 0); @@ -100,6 +103,7 @@ int __clock_gettime(clockid_t clk, struct timespec *ts) } r = -EINVAL; } +#endif return __syscall_ret(r); #endif } -- 2.25.4