+2023-08-12 Bruno Haible <bruno@clisp.org>
+
+ readutmp, boot-time: Fix parsing of /proc/uptime.
+ * lib/boot-time-aux.h (get_linux_uptime): Use c_strtod, not strtod.
+ * lib/readutmp.c: Include c-strtod.h.
+ * lib/boot-time.c: Likewise.
+ * modules/readutmp (Depends-on): Add c-strtod.
+ * modules/boot-time (Depends-on): Likewise.
+
2023-08-12 Bruno Haible <bruno@clisp.org>
readutmp: On Linux, don't fail if /var/run/utmp is not accessible.
buf[n] = '\0';
/* buf now contains two values: the uptime and the idle time. */
char *endptr;
- double uptime = strtod (buf, &endptr);
+ double uptime = c_strtod (buf, &endptr);
if (endptr > buf)
{
p_uptime->tv_sec = (time_t) uptime;