Re: [PATCH] tools/nolibc: fix error return value of clock_nanosleep()

From: Willy Tarreau
Date: Thu Jul 31 2025 - 04:42:09 EST


On Thu, Jul 31, 2025 at 10:00:31AM +0200, Thomas Weißschuh wrote:
> clock_nanosleep() returns a positive error value. Unlike other libc
> functions it *does not* return -1 nor set errno.
>
> Fix the return value and also adapt nanosleep().

Good catch, I wasn't aware of this either!

> Fixes: 7c02bc4088af ("tools/nolibc: add support for clock_nanosleep() and nanosleep()")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>

Acked-by: Willy Tarreau <w@xxxxxx>

Willy