[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64937: "who" reports funny dates
|
From: |
Thorsten Kukuk |
|
Subject: |
bug#64937: "who" reports funny dates |
|
Date: |
Thu, 10 Aug 2023 12:08:12 +0000 |
|
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hi,
currently testing current coreutils git checkout on a utmp/wtmp free
machine, looks good so far. Except there is a compile problem with this
patch:
On Tue, Aug 08, Bruno Haible wrote:
> 2023-08-08 Bruno Haible <bruno@clisp.org>
>
> readutmp: Get the boot time with higher precision.
> Suggested by Thorsten Kukuk <kukuk@suse.com> in
>
> <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md#determine-boot-time>.
> * lib/readutmp.c (get_boot_time_uncached): Try clock_gettime first.
>
> diff --git a/lib/readutmp.c b/lib/readutmp.c
> index 7ef5bfe84c..f7e43eb4a6 100644
> --- a/lib/readutmp.c
> +++ b/lib/readutmp.c
> @@ -284,6 +284,31 @@ finish_utmp (struct utmp_alloc a)
> static struct timespec
> get_boot_time_uncached (void)
> {
> + /* The clock_gettime facility returns the uptime with a resolution of 1
> µsec.
> + It is available with glibc >= 2.14. In glibc < 2.17 it required linking
> + with librt. */
> +# if __GLIBC__ + (__GLIBC_MINOR__ >= 17) > 2
> + struct timespec up;
Not sure how relevant this code still is, but currently I get with this:
lib/readutmp.c: In function 'get_boot_time_uncached':
lib/readutmp.c:326:35: error: declaration of 'up' shadows a previous local
[-Werror=shadow]
326 | struct timespec up =
| ^~
lib/readutmp.c:286:19: note: shadowed declaration is here
286 | struct timespec up;
| ^~
cc1: all warnings being treated as errors
Thorsten
--
Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies
SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nuernberg,
Germany
Managing Director: Ivo Totev, Andrew McDonald, Werner Knoblich
(HRB 36809, AG Nürnberg)
- bug#64937: boot time on Linux, (continued)
- bug#64937: boot time on Linux, Po Lu, 2023/08/10
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/10
- bug#64937: boot time on Linux, Po Lu, 2023/08/10
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/10
- bug#64937: boot time on Linux, Po Lu, 2023/08/11
- bug#64937: boot time on Linux, Natanael Copa, 2023/08/10
- bug#64937: boot time on Linux, Po Lu, 2023/08/10
- bug#64937: boot time on Linux, Natanael Copa, 2023/08/10
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/10
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/09
- Message not available
- bug#64937: "who" reports funny dates,
Thorsten Kukuk <=
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/10
- Message not available
- bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/10
- bug#64937: "who" reports funny dates, Paul Eggert, 2023/08/08
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/08
bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/02