DAHDI compile error in kernels >= 5.6 (exposed by Ubuntu 20.04 update)

The latest kernel update in Ubuntu 20.04 bumped the kernel version from 5.4 to 5.8. Now when compiling DAHDI from GIT (and from tarball too) I get the error below.

This Stack Overflow answer may give a clue of how to fix it: https://stackoverflow.com/questions/64931555/

CC [M] /home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.o
/home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c: In function ‘xbus_new’:
/home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:1636:6: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1636 | &xbus_read_proc_ops,
| ^~~~~~~~~~~~~~~~~~~
| |
| const struct file_operations *
In file included from /home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:28:
./include/linux/proc_fs.h:103:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
103 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
| ^~~~~~~~~~~~~~~~
/home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:1647:6: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1647 | &proc_xbus_command_ops, xbus);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| const struct file_operations *
In file included from /home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:28:
./include/linux/proc_fs.h:103:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
103 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
| ^~~~~~~~~~~~~~~~
/home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c: In function ‘xbus_core_init’:
/home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:2067:12: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
2067 | &xpp_proc_read_ops, NULL);
| ^~~~~~~~~~~~~~~~~~
| |
| const struct file_operations *
In file included from /home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:28:
./include/linux/proc_fs.h:103:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
103 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:286: /home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp/xbus-core.o] Error 1
make[2]: *** [scripts/Makefile.build:515: /home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi/xpp] Error 2
make[1]: *** [Makefile:1785: /home/jcastro/src/pbx/download/dahdi-linux/drivers/dahdi] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-5.8.0-59-generic’
make: *** [Makefile:74: modules] Error 2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.