Linux: Fix detection of register_sysctl_sz

Adjust the m4 function to mimic sentinel we use in spl-proc.c
This fixes the detection on kernels compiled with CONFIG_RANDSTRUCT=y

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: Pavel Snajdr <snajpa@snajpa.net>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ivan Volosyuk <Ivan.Volosyuk@gmail.com>
Closes: #16620
Closes: #16805
This commit is contained in:
Ivan Volosyuk 2024-11-30 14:50:37 +11:00 committed by Tony Hutter
parent 0f86fcc2a7
commit 02e73c5f45

View File

@ -36,7 +36,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_SZ], [
ZFS_LINUX_TEST_SRC([has_register_sysctl_sz], [ ZFS_LINUX_TEST_SRC([has_register_sysctl_sz], [
#include <linux/sysctl.h> #include <linux/sysctl.h>
],[ ],[
struct ctl_table test_table[] __attribute__((unused)) = {0}; struct ctl_table test_table[] __attribute__((unused)) = {{}};
register_sysctl_sz("", test_table, 0); register_sysctl_sz("", test_table, 0);
]) ])
]) ])