From c64f983b93409fd5f73e118a0dc36dc2d0d2f83f Mon Sep 17 00:00:00 2001 From: Solar Designer Date: Sun, 28 Jul 2024 16:14:58 +0200 Subject: [PATCH] sysctl: Exclude the trailing empty element on recent kernels Fixes #347 --- src/modules/comm_channel/p_comm_channel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/comm_channel/p_comm_channel.c b/src/modules/comm_channel/p_comm_channel.c index 63720638..e130e3e6 100644 --- a/src/modules/comm_channel/p_comm_channel.c +++ b/src/modules/comm_channel/p_comm_channel.c @@ -332,7 +332,14 @@ struct ctl_table p_lkrg_sysctl_table[] = { .extra1 = &p_profile_enforce_min, .extra2 = &p_profile_enforce_max, }, +/* + * Empty element at the end of array was required when register_sysctl() was a + * function. It's no longer required when it became a macro in 2023, and it's + * disallowed after further changes in 2024. + */ +#ifndef register_sysctl { } +#endif };