mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 10:57:01 +00:00
define CLOCK_MONOTONIC if needed
This commit is contained in:
parent
b65354d237
commit
f581ef9453
4
dbutil.c
4
dbutil.c
@ -634,6 +634,10 @@ reach userspace include headers */
|
|||||||
#ifndef CLOCK_MONOTONIC_COARSE
|
#ifndef CLOCK_MONOTONIC_COARSE
|
||||||
#define CLOCK_MONOTONIC_COARSE 6
|
#define CLOCK_MONOTONIC_COARSE 6
|
||||||
#endif
|
#endif
|
||||||
|
/* Some old toolchains know SYS_clock_gettime but not CLOCK_MONOTONIC */
|
||||||
|
#ifndef CLOCK_MONOTONIC
|
||||||
|
#define CLOCK_MONOTONIC 1
|
||||||
|
#endif
|
||||||
static clockid_t get_linux_clock_source() {
|
static clockid_t get_linux_clock_source() {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
if (syscall(SYS_clock_gettime, CLOCK_MONOTONIC_COARSE, &ts) == 0) {
|
if (syscall(SYS_clock_gettime, CLOCK_MONOTONIC_COARSE, &ts) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user