diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-01-05 09:11:30 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-01-23 14:29:44 +0100 |
commit | 81286d78f5d7655a3cf9d3c61403363bab5f4be9 (patch) | |
tree | 93e2897dbdb6ec8f88c3023d2d8b9eef16eb90ba /src | |
parent | 0c6958b2e3d6c01e13038fa690036ccbb922cce3 (diff) |
noise: replace getnstimeofday64 with ktime_get_real_ts64
The former was just a wrapper around the latter, and so upstream is now
removing it.
Also adjust the compat kludge to deal with this.
Reported-by: Alex Xu <alex@alxu.ca>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/compat/compat.h | 2 | ||||
-rw-r--r-- | src/noise.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index d20a587..4ffe387 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -647,7 +647,7 @@ struct _____dummy_container { char dev; }; #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) #define timespec64 timespec -#define getnstimeofday64 getnstimeofday +#define ktime_get_real_ts64 ktime_get_real_ts #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) diff --git a/src/noise.c b/src/noise.c index fb65c4f..e629307 100644 --- a/src/noise.c +++ b/src/noise.c @@ -450,7 +450,7 @@ static void tai64n_now(u8 output[NOISE_TIMESTAMP_LEN]) { struct timespec64 now; - getnstimeofday64(&now); + ktime_get_real_ts64(&now); /* https://cr.yp.to/libtai/tai64.html */ *(__be64 *)output = cpu_to_be64(0x400000000000000aULL + now.tv_sec); *(__be32 *)(output + sizeof(__be64)) = cpu_to_be32(now.tv_nsec); |