I am trying to build the TIPC module for RHEL7.6 kernel. I set up the build environment but ran into the EXACT set of problems shown here. Apparently Red Hat ported some kernel changes but didn't rebuild all dependencies.
I made the recommended changes in net/tipc/netlink.c
I removed the GENL_ID_GENERATE field completely.
I made the recommended changes: "Include two references to genl_ops structure as elements in the genl_family structure" To do this I switched order of (including code inside brackets):
static struct genl_ops{}
static struct genl_family{}
And added:
.ops = tipc_genl_ops,
.n_ops = 2
to
genl_family{}
When trying to compile the module I now get the error: "error: initializer element is not constant" and it references this line:
.ops = tipc_genl_ops,
What am I doing wrong and how can I get this to compile?