Signed-off-by: Felix Fietkau <nbd@xxxxxxxx> --- backport/backport-include/linux/timekeeping.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h index 30f9b7a9..56c3deec 100644 --- a/backport/backport-include/linux/timekeeping.h +++ b/backport/backport-include/linux/timekeeping.h @@ -24,6 +24,13 @@ static inline u64 ktime_get_boot_ns(void) } #endif /* < 3.17 */ +#if LINUX_VERSION_IS_LESS(4,18,0) +static inline time64_t ktime_get_boottime_seconds(void) +{ + return ktime_divns(ktime_get_boottime(), NSEC_PER_SEC); +} +#endif /* < 4.18 */ + #if LINUX_VERSION_IS_LESS(3,19,0) static inline time64_t ktime_get_seconds(void) { -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe backports" in