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 .
This commit is contained in:
PGNet Dev
2019-03-04 12:10:08 -08:00
committed by Jan Engelhardt
parent 53b6b862cc
commit 68d895f75c

View File

@@ -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;