Proxmox 8 and Usb redirector? Module compile for kernel 6.2

olegfusion

Member
Jan 26, 2020
10
2
23
54
Good day everyone, did anybody find a way to compile usb redirector module for Linux kernel 6.2?

I have this:

make -C /lib/modules/6.2.16-3-pve/build M=/root/usb-redirector-linux-x86_64/files/modules/src/tusbd modules
make[1]: Entering directory '/usr/src/linux-headers-6.2.16-3-pve'
CC [M] /root/usb-redirector-linux-x86_64/files/modules/src/tusbd/driver.o
CC [M] /root/usb-redirector-linux-x86_64/files/modules/src/tusbd/cdev.o
/root/usb-redirector-linux-x86_64/files/modules/src/tusbd/cdev.c: In function ‘lllIIIllI’:
/root/usb-redirector-linux-x86_64/files/modules/src/tusbd/cdev.c:54:20: error: assignment to ‘int (*)(const struct device *, struct kobj_uevent_env *)’ from incompatible pointer type ‘int (*)(struct device *, struct kobj_uevent_env *)’ >
54 | lIIIlII->dev_uevent=IIlIlIIl,
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:260: /root/usb-redirector-linux-x86_64/files/modules/src/tusbd/cdev.o] Error 1
make[1]: *** [Makefile:2026: /root/usb-redirector-linux-x86_64/files/modules/src/tusbd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.2.16-3-pve'
make: *** [Makefile:61: default] Error 2

Thanks for any hint
 
Hello!
/root/usb-redirector-linux-x86_64/files/modules/src/tusbd/cdev.c:54:20: error: assignment to ‘int (*)(const struct device *, struct kobj_uevent_env *)’ from incompatible pointer type ‘int (*)(struct device *, struct kobj_uevent_env *)’ >

They added "const" to struct device for kernels 6.x.

I've just changed in cdev.c:35:
C:
static int IIlIlIIl(struct device*dev,struct kobj_uevent_env*IIllIlI);
to
C:
static int IIlIlIIl(const struct device*dev,struct kobj_uevent_env*IIllIlI);

and in cdev.c:104:
C:
struct device*device
to
C:
const struct device*device.

Hope it could help someone!
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!