Hi,
While trying to compile rtnet 0.6.0 on my debian testing box (gcc 3.3.3, kernel 2.4.24-adeos, rtai-3.0), I get the same error as Hans-Peter Bock described in <http://sourceforge.net/mailarchive/message.php?msg_id=7010119>
Nor the patch of Jan <http://sourceforge.net/mailarchive/message.php?msg_id=7010108> nor the one of Takis <http://sourceforge.net/mailarchive/message.php?msg_id=7010126>
change anything for me
I also tried latest CVS, but that didn't help either.
As CVS is still broken - they are promising to fix it until tomorrow - here comes a patch which should finally solve your issue.
The problem was my misunderstanding of the usage of the _IOW/_IOR macros: the size parameter has to be specified without any "sizeof". Your debian testing comes with new 2.6 user headers which now do some new verifications of this parameter, and these tests failed.
Jan
Index: include/tdma.h =================================================================== RCS file: /cvsroot/rtnet/rtnet/include/tdma.h,v retrieving revision 1.8 diff -u -r1.8 tdma.h --- include/tdma.h 13 Jan 2004 12:26:06 -0000 1.8 +++ include/tdma.h 29 Jan 2004 16:26:02 -0000 @@ -79,22 +79,22 @@ #define TDMA_IOC_CLIENT _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 0, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_MASTER _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 1, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_UP _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 2, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_DOWN _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 3, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_ADD _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 4, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_REMOVE _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 5, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_CYCLE _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 6, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_MTU _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 7, \ - sizeof(struct tdma_config)) + struct tdma_config) #define TDMA_IOC_OFFSET _IOW(RTNET_IOC_TYPE_RTMAC_TDMA, 8, \ - sizeof(struct tdma_config)) + struct tdma_config) #endif /* __TDMA_H_ */ Index: include/rtcfg.h =================================================================== RCS file: /cvsroot/rtnet/rtnet/include/rtcfg.h,v retrieving revision 1.1 diff -u -r1.1 rtcfg.h --- include/rtcfg.h 5 Jan 2004 15:04:09 -0000 1.1 +++ include/rtcfg.h 29 Jan 2004 16:26:02 -0000 @@ -120,20 +120,20 @@ #define RTCFG_IOC_SERVER _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_SERVER, \ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #define RTCFG_IOC_ADD_IP _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_ADD_IP, \ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #define RTCFG_IOC_ADD_MAC _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_ADD_MAC, \ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #define RTCFG_IOC_DEL_IP _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_DEL_IP, \ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #define RTCFG_IOC_DEL_MAC _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_DEL_MAC, \ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #define RTCFG_IOC_WAIT _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_WAIT, \ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #define RTCFG_IOC_CLIENT _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_CLIENT, \ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #define RTCFG_IOC_ANNOUNCE _IOW(RTNET_IOC_TYPE_RTCFG, RTCFG_CMD_ANNOUNCE,\ - sizeof(struct rtcfg_cmd)) + struct rtcfg_cmd) #endif /* __RTCFG_H_ */ Index: include/rtnet_chrdev.h =================================================================== RCS file: /cvsroot/rtnet/rtnet/include/rtnet_chrdev.h,v retrieving revision 1.6 diff -u -r1.6 rtnet_chrdev.h --- include/rtnet_chrdev.h 13 Jan 2004 16:41:03 -0000 1.6 +++ include/rtnet_chrdev.h 29 Jan 2004 16:26:02 -0000 @@ -80,18 +80,18 @@ #define RTNET_IOC_TYPE_RTMAC_TDMA 100 #define IOC_RT_IFUP _IOW(RTNET_IOC_TYPE_CORE, 0, \ - sizeof(struct rtnet_core_cfg)) + struct rtnet_core_cfg) #define IOC_RT_IFDOWN _IOW(RTNET_IOC_TYPE_CORE, 1, \ - sizeof(struct rtnet_core_cfg)) + struct rtnet_core_cfg) /*#define IOC_RT_IF _IOWR(RTNET_IOC_TYPE_CORE, 2, \ - sizeof(struct rtnet_core_cfg))*/ + struct rtnet_core_cfg)*/ /*#define IOC_RT_ROUTE_ADD _IOW(RTNET_IOC_TYPE_CORE, 3, \ - sizeof(struct rtnet_core_cfg))*/ + struct rtnet_core_cfg)*/ #define IOC_RT_ROUTE_SOLICIT _IOW(RTNET_IOC_TYPE_CORE, 4, \ - sizeof(struct rtnet_core_cfg)) + struct rtnet_core_cfg) #define IOC_RT_ROUTE_DELETE _IOW(RTNET_IOC_TYPE_CORE, 5, \ - sizeof(struct rtnet_core_cfg)) + struct rtnet_core_cfg) /*#define IOC_RT_ROUTE_GET _IOR(RTNET_IOC_TYPE_CORE, 6, \ - sizeof(struct rtnet_core_cfg))*/ + struct rtnet_core_cfg)*/ #endif /* __RTNET_CHRDEV_H_ */

