0

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.

STACK EXCHANGE

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?

edged1g
  • 1
  • 2
  • Please, show **exact** error message. Probably, this is not the first error message and previous one is about not declared `tipc_genl_ops`. – Tsyvarev Nov 15 '19 at 22:00
  • There is no error about it not being declared. – edged1g Nov 17 '19 at 12:54
  • Type of `.ops` [field](https://elixir.bootlin.com/linux/v4.10.17/source/include/net/genetlink.h#L67) is a `const struct genl_ops *`, so the value assigned to it should be a **pointer**: `.ops = &tipc_genl_ops,`. – Tsyvarev Nov 17 '19 at 13:25

0 Answers0