Skip to content

Commit

Permalink
Linux: Fix detection of register_sysctl_sz
Browse files Browse the repository at this point in the history
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: openzfs#16620
Closes: openzfs#16805
  • Loading branch information
IvanVolosyuk authored and tonyhutter committed Dec 4, 2024
1 parent 0f86fcc commit 02e73c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/kernel-register_sysctl_table.m4
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_SZ], [
ZFS_LINUX_TEST_SRC([has_register_sysctl_sz], [
#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);
])
])
Expand Down

0 comments on commit 02e73c5

Please sign in to comment.