From: PGNet Dev Date: Mon, 4 Mar 2019 20:10:08 +0000 (-0800) Subject: xt_SYSRQ: replace do_gettimeofday X-Git-Tag: v3.3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68d895f75cd31ca0b90aa59ea53ca37fbd66421d;p=thirdparty%2Fxtables-addons.git xt_SYSRQ: replace do_gettimeofday Linux kernel commit v4.20-rc1-18-ge4b92b108c6c removed do_gettimeofday in favor of ktime_get_real_ts64 introduced in v3.16-rc5-59-gd6d29896c665 . --- diff --git a/extensions/xt_SYSRQ.c b/extensions/xt_SYSRQ.c index 64fc71a..c386c7e 100644 --- a/extensions/xt_SYSRQ.c +++ b/extensions/xt_SYSRQ.c @@ -314,7 +314,7 @@ static void sysrq_crypto_exit(void) static int __init sysrq_crypto_init(void) { #if defined(WITH_CRYPTO) - struct timeval now; + struct timespec64 now; int ret; sysrq_tfm = crypto_alloc_shash(sysrq_hash, 0, 0); @@ -339,7 +339,7 @@ static int __init sysrq_crypto_init(void) sizeof(sysrq_password), GFP_KERNEL); if (sysrq_digest_password == NULL) goto fail; - do_gettimeofday(&now); + ktime_get_real_ts64(&now); sysrq_seqno = now.tv_sec; return 0;