All of lore.kernel.org
 help / color / mirror / Atom feed
* xtables-addons build fail with linux 5.0: "error: implicit declaration of function 'do_gettimeofday'; did you mean 'do_settimeofday64'?"
@ 2019-03-04 19:01 PGNet Dev
  2019-03-04 19:51 ` PGNet Dev
  0 siblings, 1 reply; 4+ messages in thread
From: PGNet Dev @ 2019-03-04 19:01 UTC (permalink / raw)
  To: netfilter-devel

Building 'xtable-addons' v3.2 for just-released Linux 5.0,

	https://build.opensuse.org/package/show/home:pgnd:Kernel:stable/xtables-addons

fails at

	https://build.opensuse.org/public/build/home:pgnd:Kernel:stable/openSUSE_Leap_15.0/x86_64/xtables-addons/_log

	...
	[53s]gcc -Wp, -MD, /home/abuild/rpmbuild/BUILD/xtables-addons-default-3.2/extensions/.xt_condition.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/8/include -I/usr/src/linux-5.0.0-lp150.4.g6bc6477/arch/x86/include -I./arch/x86/include/generated  -I/usr/src/linux-5.0.0-lp150.4.g6bc6477/include -I./include -I/usr/src/linux-5.0.0-lp150.4.g6bc6477/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/usr/src/linux-5.0.0-lp150.4.g6bc6477/include/uapi -I./include/generated/uapi -include /usr/src/linux-5.0.0-lp150.4.g6bc6477/include/linux/kconfig.h -include /usr/src/linux-5.0.0-lp150.4.g6bc6477/include/linux/compiler_types.h  -I/home/abuild/rpmbuild/BUILD/xtables-addons-default-3.2/extensions -I/home/abuild/rpmbuild/BUILD/xtables-addons-default-3.2/extensions -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror-implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89-mno-sse -mno-mmx -mno-sse2-mno-3dnow -mno-avx -m64-falign-jumps=1-falign-loops=1-mno-80387-mno-fp-ret-in-387-mpreferred-stack-boundary=3-mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1-DCONFIG_AS_CFI_SIGNAL_FRAME=1-DCONFIG_AS_CFI_SECTIONS=1-DCONFIG_AS_FXSAVEQ=1-DCONFIG_AS_SSSE3=1-DCONFIG_AS_AVX=1-DCONFIG_AS_AVX2=1-DCONFIG_AS_AVX512=1-DCONFIG_AS_SHA1_NI=1-DCONFIG_AS_SHA256_NI=1-Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2--param=allow-store-data-races=0-Wframe-larger-than=2048-fstack-protector -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=/usr/src/linux-5.0.0-lp150.4.g6bc6477/= -Wno-packed-not-aligned  -DMODULE  -DKBUILD_BASENAME='"xt_condition"' -DKBUILD_MODNAME='"xt_condition"' -c -o /home/abuild/rpmbuild/BUILD/xtables-addons-default-3.2/extensions/xt_condition.o /home/abuild/rpmbuild/BUILD/xtables-addons-default-3.2/extensions/xt_condition.c
	[53s]/home/abuild/rpmbuild/BUILD/xtables-addons-default-3.2/extensions/xt_SYSRQ.c: In function 'sysrq_crypto_init':
	[53s]/home/abuild/rpmbuild/BUILD/xtables-addons-default-3.2/extensions/xt_SYSRQ.c:342:2: error: implicit declaration of function 'do_gettimeofday'; did you mean 'do_settimeofday64'? [
	-Werror=implicit-function-declaration
	]
	[53s]do_gettimeofday(&now);
	[53s]^~~~~~~~~~~~~~~
	[53s]do_settimeofday64
	[53s]cc1: some warnings being treated as errors
	...

Doing some limited digging, I do find

	https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1811721/comments/6

which, although re: NVIDIA build, *does* point out

	...
	change in kernel function do_gettimeofday to efi_gettimeofday
	...

I haven't yet found the documentation of that change on kernel.org for v5.0 ...

Can anyone confirm that kernel change, and if there's a fix/thread already underway for xtables-addons?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xtables-addons build fail with linux 5.0: "error: implicit declaration of function 'do_gettimeofday'; did you mean 'do_settimeofday64'?"
  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
  0 siblings, 1 reply; 4+ messages in thread
From: PGNet Dev @ 2019-03-04 19:51 UTC (permalink / raw)
  To: netfilter-devel

> Can anyone confirm that kernel change

this appears to be it:

  https://github.com/torvalds/linux/commit/e4b92b108c6cd6b311e4b6e85d6a87a34599a6e3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xtables-addons build fail with linux 5.0: "error: implicit declaration of function 'do_gettimeofday'; did you mean 'do_settimeofday64'?"
  2019-03-04 19:51 ` PGNet Dev
@ 2019-03-04 20:10   ` PGNet Dev
  2019-03-07  9:30     ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: PGNet Dev @ 2019-03-04 20:10 UTC (permalink / raw)
  To: netfilter-devel

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xtables-addons build fail with linux 5.0: "error: implicit declaration of function 'do_gettimeofday'; did you mean 'do_settimeofday64'?"
  2019-03-04 20:10   ` PGNet Dev
@ 2019-03-07  9:30     ` Jan Engelhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2019-03-07  9:30 UTC (permalink / raw)
  To: PGNet Dev; +Cc: netfilter-devel

On Monday 2019-03-04 21:10, PGNet Dev wrote:

>this patch,
>
>  https://bugzilla.opensuse.org/show_bug.cgi?id=1127790#c3

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-07  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-03-07  9:30     ` Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.