mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Markus Wichmann <nullplan@gmx.net>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>, musl@lists.openwall.com
Subject: Re: [musl] Busybox hwclock failing to build with musl RISC-V 32-bit: SYS_settimeofday undefined
Date: Sun, 7 Apr 2024 21:50:13 +0200	[thread overview]
Message-ID: <ZhL49ROBldneqCGV@voyager> (raw)
In-Reply-To: <ZhLZv7xh5XnQpZxA@voyager>

Am Sun, Apr 07, 2024 at 07:37:03PM +0200 schrieb Markus Wichmann:
> Hi,
>
> this is a very much a Busybox problem. musl does provide settimeofday(),
> but it doesn't send the time zone to the kernel. This is because the
> kernel time zone has some hardcoded unexpected uses, to be nice about
> it.
>
> The Busybox maintainers don't like that musl doesn't do this, and so
> call the syscall directly. And this fails for RISC-V, which doesn't have
> a SYS_settimeofday. I mean, it also fails for all the 32-bit
> architectures which do have a SYS_settimeofday but with a different
> timeval structure. But maybe the timezone structure is correct there.
>
> Busybox is trying to do the wrong thing here, simple as. The reasoning
> for not doing the right thing I have read is spurious at best. If the
> hwclock time is in local time, then /etc/localtime should be the correct
> time zone, and mktime() will provide the closest you are going to get to
> a "right" system time.
>
> Note that we recently had a thread about the perils of local time, and
> it is simply a mess, and sometimes libc has no good choices.
>
> Ciao,
> Markus

On an unrelated note, you may need to quote the entire message I sent
before because the Busybox mailing list refused my message since I am
not subscribed to it. And nor do I want to be.

Ciao,
Markus

  reply	other threads:[~2024-04-07 19:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 17:18 Thomas Petazzoni
2024-04-07 17:37 ` Markus Wichmann
2024-04-07 19:50   ` Markus Wichmann [this message]
2024-04-08  2:18 ` Rich Felker
  -- strict thread matches above, loose matches on Subject: below --
2024-03-03 14:36 Thomas Petazzoni
2024-03-03 15:17 ` Rich Felker
2024-03-05 20:30   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZhL49ROBldneqCGV@voyager \
    --to=nullplan@gmx.net \
    --cc=musl@lists.openwall.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wbx@openadk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).