Created attachment 202489 [details] patch to fix build of dyn_sysctl kld example The dyn_sysctl example KLD for showing use of sysctls via a kernel module seems to have been broken since 11.0 release. I have not been tracking, so I am not sure, exactly. It seems that the quick fix is to adjust the API use for adding a root node, I believe. I am attaching a patch for this. It seems a similar bug is affecting the compilation of a port, but I cannot for the life remember which one it is right now.
LGTM. We ran into a similar issue migrating an out of tree 10ish module that added a sysctl root to 11ish, so I believe you are also correct about the timeframe.
Anything I can do to move this forward? I know it is a minor change, so mostly just curious how I can help.
Committed, thanks for submitting it. I'll take care of MFC to stable branches in a week.
A commit references this bug: Author: gonzo Date: Sat Mar 16 04:24:02 UTC 2019 New revision: 345220 URL: https://svnweb.freebsd.org/changeset/base/345220 Log: Fix build for KLD dyn_sysctl example Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE PR: 236139 Submitted by: Andrew Reiter <arr@watson.org> MFC after: 1 week Changes: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c
Thank you!
A commit references this bug: Author: gonzo Date: Sat Mar 23 23:44:40 UTC 2019 New revision: 345463 URL: https://svnweb.freebsd.org/changeset/base/345463 Log: MFC r345220: Fix build for KLD dyn_sysctl example Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE PR: 236139 Submitted by: Andrew Reiter <arr@watson.org> Changes: _U stable/12/ stable/12/share/examples/kld/dyn_sysctl/dyn_sysctl.c