Make error on CentOS 8

jul2003 <[email protected]> Wed, 29 May 2024 19:12:31 +0200
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CADgzTi0eGcvVd82T8uyHgAq-jwUV8gyW5cBTBik359gnrj78qg@mail.gmail.com>
Hi,

I know CentOS 8 is End of Life but for now i have to keep it.
I'm on Centos Linux release 8.5.2111 and when i try to build linux-gpib
4.3.6 i get the following error
linux-gpib-kernel-4.3.6/drivers/gpib/fmh_gpib/fmh_gpib.c:1411:47: error:
passing argument 4 of ‘driver_find_device’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
   NULL, (DRIVER_FIND_DEVICE_DATA_TYPE)config, &fmh_gpib_device_match);
                                               ^~~~~~~~~~~~~~~~~~~~~~
In file included from
/****/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/compat/include/linux/device.h:89,

I notice on the file compat/include/linux/device.h that at the end there is
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
#define DRIVER_FIND_DEVICE_DATA_TYPE void *
#else
#define DRIVER_FIND_DEVICE_DATA_TYPE const void *
#endif

if i force DRIVER_FIND_DEVICE_DATE_TYPE to be const void * it works well

In /usr/src/linux/version.h i have this
#define LINUX_VERSION_CODE 266752
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))


Thanks for your help

jul2003

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general