From 67c1ff30c98f49b3f974a5ba5f84c09552ec6e88 Mon Sep 17 00:00:00 2001 From: gonzo Date: Sat, 16 Mar 2019 04:24:02 +0000 Subject: [PATCH] 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 MFC after: 1 week --- share/examples/kld/dyn_sysctl/dyn_sysctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/share/examples/kld/dyn_sysctl/dyn_sysctl.c b/share/examples/kld/dyn_sysctl/dyn_sysctl.c index 0d8634f61515..c7ff6fb2c48c 100644 --- a/share/examples/kld/dyn_sysctl/dyn_sysctl.c +++ b/share/examples/kld/dyn_sysctl/dyn_sysctl.c @@ -72,12 +72,10 @@ load(module_t mod, int cmd, void *arg) * to different contexts. */ printf("TREE ROOT NAME\n"); - a_root = SYSCTL_ADD_NODE(&clist, - SYSCTL_STATIC_CHILDREN(/* top of sysctl tree */), + a_root = SYSCTL_ADD_ROOT_NODE(&clist, OID_AUTO, "dyn_sysctl", CTLFLAG_RW, 0, "dyn_sysctl root node"); - a_root = SYSCTL_ADD_NODE(&clist1, - SYSCTL_STATIC_CHILDREN(/* top of sysctl tree */), + a_root = SYSCTL_ADD_ROOT_NODE(&clist1, OID_AUTO, "dyn_sysctl", CTLFLAG_RW, 0, "dyn_sysctl root node"); if (a_root == NULL) {