在UC/OS-II下移植LwIP- 作者:小盒子 ://./releases/lwip/下载的最新版本LwIP-,将修改原文件才能顺利通过ADS的编译。-->#include<>去掉,否则将会报错!出错信息如下: 原来这些宏与本地库提供的宏产生了冲突。这几个宏在<>中已经定义,,因此产生了重定义错误,。:if->ppp->:PACK_STRUCT_BEGINstructip{#ifdefined(NO_CHAR_BITFIELDS) u_charip_hl_v; /*formipsmeansthebitfieldstuffwillsometimesbreak-soweuseacharforbothandgetrounditwithmacro'sinstead...*/#else#ifBYTE_ORDER==LITTLE_ENDIAN unsignedip_hl:4, /*headerlength*/ ip_v:4; /*version*/#elifBYTE_ORDER==BIG_ENDIAN unsignedip_v:4, /*version*/ ip_hl:4; /*headerlength*/#else //COMPLAIN-NOBYTEORDERSELECTED!#endif#endif u_char ip_tos; /*typeofservice*/ u_short ip_len; /*totallength*/ u_short ip_id; /*identification*/ u_short ip_off; /*fragmentoffsetfield*/#define IP_DF0x4000 /*dontfragmentflag*/#define IP_MF0x2000 /*morefragmentsflag*/#define IP_OFFMASK0x1fff /*maskforfragmentingbits*/ u_char ip_ttl; /*timetolive*/ u_char ip_p; /*protocol*/ u_short ip_sum; /*checksum*/ structin_addrip_src,ip_dst; /*sourceanddestaddress*/};PACK_STRUCT_END将其修改成以下格式:PACK_STRUCT_BEGINstructip{#ifdefined(NO_CHAR_BITFIELDS) u_charip_hl_v; /*formipsmeansthebitfieldstuffwillsometimesbreak-soweuseacharforbothandgetrounditwithmacro'
在ucos-ii下移植lwip-120 来自淘豆网www.taodocs.com转载请标明出处.