asterisk / dahdi-linux

This is the official dahdi-linux repository. All issues and PR should be raised here.
GNU General Public License v2.0
49 stars 71 forks source link

In Rocky Linux 8.8 or 9.2 got compilation failures related with netif_napi_add function #38

Open rodolfojcj opened 1 year ago

rodolfojcj commented 1 year ago

When using either the DAHDI linux complete 3.2.0 tar.gz file or the master branch sources, trying to compile on Rocky Linux 8.9 or 9.2 fails with error messages like these:

linux/drivers/dahdi/wctc4xxp/base.c: In function ‘wctc4xxp_net_register’:
linux/drivers/dahdi/wctc4xxp/base.c:665:9: error: too many arguments to function ‘netif_napi_add’
665 |         netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
    |         ^~~~~~~~~~~~~~
In file included from ./include/net/inet_sock.h:19,
                 from ./include/linux/udp.h:16,
                 from /linux/drivers/dahdi/wctc4xxp/base.c:38: 
./include/linux/netdevice.h:2519:1: note: declared here
2519 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
     | ^~~~~~~~~~~~~~
rodolfojcj commented 1 year ago

The attached file dahdi-linux-issue-38-fix-24sept2023.zip has a possible fix to this issue.

I tested it with:

In all those cases the compilation is successful.

Thanks in advance for any developer of this project that may review and possibly apply this fix for the master branch.

InterLinked1 commented 1 month ago

As with another issue, this appears to be addressed by https://github.com/asterisk/dahdi-linux/commit/08fda500eda8893fddb269e07e3b1eaafd0a684b, though with slightly differing version numbers.