OpenVPN / ovpn-dco

OpenVPN Data Channel Offload in the linux kernel
101 stars 23 forks source link

tcp.c:482:31: error: assignment to ‘int (*)(struct sock *, struct msghdr *, size_t, int, int, int *)’ #54

Closed prchal closed 7 months ago

prchal commented 7 months ago

While compiling I get this error: /home/prchal/cdubian/ovpn-dco/drivers/net/ovpn-dco/tcp.c: In function ‘ovpn_tcp_init’: /home/prchal/cdubian/ovpn-dco/drivers/net/ovpn-dco/tcp.c:482:31: error: assignment to ‘int ()(struct sock , struct msghdr , size_t, int, int, int )’ {aka ‘int ()(struct sock , struct msghdr , unsigned int, int, int, int )’} from incompatible pointer type ‘int ()(struct sock , struct msghdr , size_t, int, int )’ {aka ‘int ()(struct sock , struct msghdr , unsigned int, int, int )’} [-Werror=incompatible-pointer-types] 482 | ovpn_tcp_prot.recvmsg = ovpn_tcp_recvmsg; | ^ cc1: some warnings being treated as errors

I did crosscompilation on Ubuntu 22.04: ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- make KERNEL_SRC=/home/prchal/cdubian/linux/

ordex commented 7 months ago

what kernel are you compiling against? and is that a vanilla kernel? or is it a distro patched tree?

prchal commented 7 months ago

vanilla 5.17.15

ordex commented 7 months ago

Indeed there was a mistake in the ifdef condition. Now it says "<5.16", but it should be "<5.19". I'd like to credit you as reporter (Reported-by tag). What name/email should I use?

prchal commented 7 months ago

Jiri Prchal jiri.prchal@aksignal.cz

ordex commented 7 months ago

Thanks a lot. I just pushed c24380cdb8f5 which fixes this issue.