Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Willy Tarreau" <w@1wt.eu>, shuah <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v3 08/14] tools/nolibc: use custom structs timespec and timeval
Date: Mon, 22 Dec 2025 10:38:13 +0100	[thread overview]
Message-ID: <603f8d3b-1fd7-4f68-b9e7-04093f1bc117@app.fastmail.com> (raw)
In-Reply-To: <20251220-nolibc-uapi-types-v3-8-c662992f75d7@weissschuh.net>

On Sat, Dec 20, 2025, at 14:55, Thomas Weißschuh wrote:
> 
> +struct timespec {
> +	__kernel_old_time_t	tv_sec;
> +	long			tv_nsec;
> +};
> +#define _STRUCT_TIMESPEC
> +
> +struct timeval {
> +	__kernel_old_time_t	tv_sec;
> +	__kernel_suseconds_t	tv_usec;
> +};
> +
> +#define timeval __nolibc_kernel_timeval
> +#include <linux/time.h>
> +#undef timeval

This looks like an appropriate workaround for nolibc so
it can work with old kernel headers, but I feel like we
need to also fix the kernel headers so at some point in
the future we won't need those workarounds any more.

    Arnd

  reply	other threads:[~2025-12-22  9:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-20 13:55 [PATCH v3 00/14] tools/nolibc: always use 64-bit time-related types Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 01/14] tools/nolibc/poll: use kernel types for system call invocations Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 02/14] tools/nolibc/poll: drop __NR_poll fallback Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 03/14] tools/nolibc/select: drop non-pselect based implementations Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 04/14] tools/nolibc/time: drop invocation of gettimeofday system call Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 05/14] tools/nolibc: prefer explicit 64-bit time-related system calls Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 06/14] tools/nolibc/gettimeofday: avoid libgcc 64-bit divisions Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 07/14] tools/nolibc/select: avoid libgcc 64-bit multiplications Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 08/14] tools/nolibc: use custom structs timespec and timeval Thomas Weißschuh
2025-12-22  9:38   ` Arnd Bergmann [this message]
2025-12-20 13:55 ` [PATCH v3 09/14] tools/nolibc: always use 64-bit time types Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 10/14] selftests/nolibc: test compatibility of nolibc and kernel " Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 11/14] tools/nolibc: remove time conversions Thomas Weißschuh
2025-12-20 13:55 ` [PATCH v3 12/14] tools/nolibc: add compiler version detection macros Thomas Weißschuh
2025-12-22  8:48   ` Willy Tarreau
2025-12-20 13:55 ` [PATCH v3 13/14] tools/nolibc: add __nolibc_static_assert() Thomas Weißschuh
2025-12-22  8:47   ` Willy Tarreau
2025-12-20 13:55 ` [PATCH v3 14/14] selftests/nolibc: add static assertions around time types handling Thomas Weißschuh
2025-12-22  9:39 ` [PATCH v3 00/14] tools/nolibc: always use 64-bit time-related types Arnd Bergmann

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=603f8d3b-1fd7-4f68-b9e7-04093f1bc117@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=shuah@kernel.org \
    --cc=w@1wt.eu \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox