af-graft icon indicating copy to clipboard operation
af-graft copied to clipboard

Module building fails with Kernel 5.2.13

Open phantomcraft opened this issue 5 years ago • 1 comments

I had using kernel 4.20 lately, when I moved to 5.x I got this error when trying to build the af-graft kernel module:

$ make
echo -I/../include/
-I/../include/
make -C /lib/modules/5.2.13-xanmod10/build M=/opt/af-graft/kmod V=0 modules
make[1]: Entering directory '/usr/src/linux-headers-5.2.13-xanmod10'
  CC [M]  /opt/af-graft/kmod/af_graft.o
/opt/af-graft/kmod/af_graft.c:170:4: error: ‘struct genl_ops’ has no member named ‘policy’
  170 |   .policy = graft_nl_policy,
      |    ^~~~~~
/opt/af-graft/kmod/af_graft.c:170:13: error: initialization of ‘int (*)(struct netlink_callback *)’ from incompatible pointer type ‘struct nla_policy *’ [-Werror=incompatible-pointer-types]
  170 |   .policy = graft_nl_policy,
      |             ^~~~~~~~~~~~~~~
/opt/af-graft/kmod/af_graft.c:170:13: note: (near initialization for ‘graft_nl_ops[0].start’)
/opt/af-graft/kmod/af_graft.c:176:4: error: ‘struct genl_ops’ has no member named ‘policy’
  176 |   .policy = graft_nl_policy,
      |    ^~~~~~
/opt/af-graft/kmod/af_graft.c:176:13: error: initialization of ‘int (*)(struct netlink_callback *)’ from incompatible pointer type ‘struct nla_policy *’ [-Werror=incompatible-pointer-types]
  176 |   .policy = graft_nl_policy,
      |             ^~~~~~~~~~~~~~~
/opt/af-graft/kmod/af_graft.c:176:13: note: (near initialization for ‘graft_nl_ops[1].start’)
/opt/af-graft/kmod/af_graft.c:182:4: error: ‘struct genl_ops’ has no member named ‘policy’
  182 |   .policy = graft_nl_policy,
      |    ^~~~~~
/opt/af-graft/kmod/af_graft.c:182:13: error: initialization of ‘int (*)(struct netlink_callback *)’ from incompatible pointer type ‘struct nla_policy *’ [-Werror=incompatible-pointer-types]
  182 |   .policy = graft_nl_policy,
      |             ^~~~~~~~~~~~~~~
/opt/af-graft/kmod/af_graft.c:182:13: note: (near initialization for ‘graft_nl_ops[2].done’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:285: /opt/af-graft/kmod/af_graft.o] Error 1
make[1]: *** [Makefile:1597: _module_/opt/af-graft/kmod] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.2.13-xanmod10'
make: *** [Makefile:11: all] Error 2

phantomcraft avatar Sep 15 '19 15:09 phantomcraft

The module doesn't compile on 5.2.13+ kernels.

It passed one year since last commit, I think @upa should revive this project.

phantomcraft avatar May 03 '20 18:05 phantomcraft