From f29dcc25c7a784bbb3d3e92942a0a180671a04ac Mon Sep 17 00:00:00 2001 From: Ivan Volosyuk Date: Sat, 30 Nov 2024 14:50:37 +1100 Subject: [PATCH] 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 Reviewed-by: Rob Norris Reviewed-by: Pavel Snajdr Reviewed-by: Alexander Motin Signed-off-by: Ivan Volosyuk Closes: #16620 Closes: #16805 --- config/kernel-register_sysctl_table.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/kernel-register_sysctl_table.m4 b/config/kernel-register_sysctl_table.m4 index 12ffe9d95142..8dc17e2d42f9 100644 --- a/config/kernel-register_sysctl_table.m4 +++ b/config/kernel-register_sysctl_table.m4 @@ -36,7 +36,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_SZ], [ ZFS_LINUX_TEST_SRC([has_register_sysctl_sz], [ #include ],[ - struct ctl_table test_table[] __attribute__((unused)) = {0}; + struct ctl_table test_table[] __attribute__((unused)) = {{}}; register_sysctl_sz("", test_table, 0); ]) ])