SIOC* clash
Hi Wolfgang,
just realised that there is an ABI mine laid in rtcan.h:
#ifndef SIOCGIFINDEX
#define SIOCGIFINDEX \
_IOWR(RTIOC_TYPE_CAN, 0x00, struct ifreq)#endif
So, if you happen to have included sys/ioctl.h earlier in your application, an incompatible IOCTL code will be used in user space.
I recommend to switch to existing IOCTL codes where available (that's what we do in RTnet as well). This may also mean betting on the current IOCTL assignments in Socket-CAN, that they will survive unchanged the eventual merge into Linux mainline.
Jan
Quoted 9 lines · Jan Kiszka
Hi Wolfgang,
just realised that there is an ABI mine laid in
rtcan.h:#ifndef SIOCGIFINDEX
#define SIOCGIFINDEX \ _IOWR(RTIOC_TYPE_CAN, 0x00, struct ifreq)#endif
Quoted 7 lines
So, if you happen to have included
sys/ioctl.hearlier in your application, an incompatible IOCTL code will be used in user space.I recommend to switch to existing IOCTL codes where available (that's what we do in RTnet as well). This may also mean betting on the current IOCTL assignments in Socket-CAN, that they will survive unchanged the eventual merge into Linux mainline.
D'accord, I will change this with the next update.
Wolfgang.