Building this with ./build on Ubuntu 21.04 with kernel 5.11.0-22-generic results in the following errors:
In file included from /home/developer/media_build/v4l/chip.h:57, from /home/developer/media_build/v4l/fesat_commlla_str.h:49, from /home/developer/media_build/v4l/stid135_drv.h:46, from /home/developer/media_build/v4l/stid135_drv.c:36: /home/developer/media_build/v4l/stid135_drv.c: In function 'FE_STiD135_Term': /home/developer/media_build/v4l/globaldefs.h:51:19: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] 51 | #define free(p) kfree(p)
and
In file included from /home/developer/media_build/v4l/chip.h:57, from /home/developer/media_build/v4l/fesat_commlla_str.h:49, from /home/developer/media_build/v4l/stid135_drv.h:46, from /home/developer/media_build/v4l/stid135_drv.c:36: /home/developer/media_build/v4l/stid135_drv.c: In function 'fe_stid135_init': /home/developer/media_build/v4l/globaldefs.h:50:23: error: implicit declaration of function 'kzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration] 50 | #define calloc(n,s) kzalloc(n*s,GFP_KERNEL)
Apparently it would need an #include <linux/slab.h> but adding it to globaldefs.h doesn't have any effect since this file is recreated every time I run ./build. How to fix?
Building this with ./build on Ubuntu 21.04 with kernel 5.11.0-22-generic results in the following errors:
In file included from /home/developer/media_build/v4l/chip.h:57, from /home/developer/media_build/v4l/fesat_commlla_str.h:49, from /home/developer/media_build/v4l/stid135_drv.h:46, from /home/developer/media_build/v4l/stid135_drv.c:36: /home/developer/media_build/v4l/stid135_drv.c: In function 'FE_STiD135_Term': /home/developer/media_build/v4l/globaldefs.h:51:19: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] 51 | #define free(p) kfree(p)
and
In file included from /home/developer/media_build/v4l/chip.h:57, from /home/developer/media_build/v4l/fesat_commlla_str.h:49, from /home/developer/media_build/v4l/stid135_drv.h:46, from /home/developer/media_build/v4l/stid135_drv.c:36: /home/developer/media_build/v4l/stid135_drv.c: In function 'fe_stid135_init': /home/developer/media_build/v4l/globaldefs.h:50:23: error: implicit declaration of function 'kzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration] 50 | #define calloc(n,s) kzalloc(n*s,GFP_KERNEL)
Apparently it would need an #include <linux/slab.h> but adding it to globaldefs.h doesn't have any effect since this file is recreated every time I run ./build. How to fix?