Files
mosquitto/lib
Diego Santa Cruz 688fa86de4 fix CLOCK_BOOTTIME use on kernels not having it
When the libc headers used to build mosquitto define CLOCK_BOOTTIME but
the kernel where mosquitto runs does not implement CLOCK_BOOTTIME, all
timestamps are wrong (uninitialized data), because there is no check for
the success of the clock_gettime() calls.

This adds probing for the availability of CLOCK_BOOTTIME from
mosquitto_lib_init(), falling back to CLOCK_MONOTONIC, and then modifies
mosquitto_time() to use the selected clock. Probing at init time avoids
having to do two clock_gettime() calls for every timestamp if
CLOCK_BOOTTIME is not available.

It also fixes a similar problem in mosquitto_lib_init().

Signed-off-by: Diego Santa Cruz <diego.santacruz@spinetix.com>
2024-09-06 23:41:56 +01:00
..
2021-11-15 22:29:19 +00:00
2021-11-15 22:29:19 +00:00
2021-11-15 22:29:19 +00:00
2022-08-31 11:36:53 +01:00
2021-11-15 22:29:19 +00:00
2021-11-15 22:29:19 +00:00
2021-11-15 22:29:19 +00:00
2021-11-15 22:29:19 +00:00
2023-04-27 23:25:52 +01:00
2023-06-02 19:11:50 +02:00
2023-11-15 22:45:38 +00:00
2021-11-15 22:29:19 +00:00
2021-11-15 22:29:19 +00:00
2022-12-03 22:59:14 +00:00
2021-11-15 22:29:19 +00:00
2024-09-06 23:26:48 +01:00
2023-11-15 22:45:38 +00:00