From: PGNet Dev <pgnet.dev@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: Re: xtables-addons build fail with linux 5.0: "error: implicit declaration of function 'do_gettimeofday'; did you mean 'do_settimeofday64'?"
Date: Mon, 4 Mar 2019 12:10:08 -0800 [thread overview]
Message-ID: <24a74393-c0ef-72ae-88df-81734c27f699@gmail.com> (raw)
In-Reply-To: <7604c2e7-e477-028f-d0cd-2b57a56c08b1@gmail.com>
this patch,
https://bugzilla.opensuse.org/show_bug.cgi?id=1127790#c3
--------
diff -ur xtables-addons-3.2.ORIG/extensions/xt_SYSRQ.c xtables-addons-3.2/extensions/xt_SYSRQ.c
--- xtables-addons-3.2.ORIG/extensions/xt_SYSRQ.c 2018-09-07 06:04:28.000000000 -0700
+++ xtables-addons-3.2/extensions/xt_SYSRQ.c 2019-03-04 12:01:16.426428277 -0800
@@ -314,7 +314,7 @@
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,10 @@
sizeof(sysrq_password), GFP_KERNEL);
if (sysrq_digest_password == NULL)
goto fail;
- do_gettimeofday(&now);
+/* https://github.com/torvalds/linux/blob/master/Documentation/core-api/timekeeping.rst
+ * https://gitlab.com/snippets/1799795
+ */
+ ktime_get_real_ts64(&now);
sysrq_seqno = now.tv_sec;
return 0;
--------
appears to enable an ok build.
next prev parent reply other threads:[~2019-03-04 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 19:01 xtables-addons build fail with linux 5.0: "error: implicit declaration of function 'do_gettimeofday'; did you mean 'do_settimeofday64'?" PGNet Dev
2019-03-04 19:51 ` PGNet Dev
2019-03-04 20:10 ` PGNet Dev [this message]
2019-03-07 9:30 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24a74393-c0ef-72ae-88df-81734c27f699@gmail.com \
--to=pgnet.dev@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).