rtl8188cus编译


1.make 后会出现这个错误,

home/chen/rtl8188/888cus/os_dep/linux/usb_intf.c:1580:52: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
cc1: some warnings being treated as errors

关掉 usb_intf.c:中的这一句

    //DBG_871X("build time: %s %s\n", __DATE__, __TIME__);

2.再次make 会出现这个情况

/home/chen/rtl8188/888cus/os_dep/linux/rtw_android.c:233:11: error: implicit declaration of function ‘strnicmp’ [-Werror=implicit-function-declaration]
   if(0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num], strlen(android_wifi_cmd_str[cmd_num])) )
           ^
把 strnicmp 中的i去掉改为 strncmp
if(0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num], strlen(android_wifi_cmd_str[cmd_num])) )

再make就可以了

//-----------------------------------------------

http://c.biancheng.net/cpp/html/2718.html

strnicmp() 用来比较两个字符串的前n个字符,不区分大小写,其原型为:
    int strnicmp ( const char * str1, const char * str2, size_t n );

【参数】str1, str2 为需要比较的两个字符串,n为要比较的字符的数目。

【返回值】若str1与str2的前n个字符相同,则返回0;若s1大于s2,则返回大于0的值;若s1 若小于s2,则返回小于0的值。

与strncmp()不同的是,如果两个字符不同,GCC和VC都返回-1或1,而不是返回对应的ASCII的差值。

有关strnicmp()的其他说明请查看strncmp(),这里仅举例演示,不再赘述。

另外一个不区分大小写比较字符串前n个字符的函数是strncmpi(),strncmpi()是strnicmp()的宏定义,实际未提供此函数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mcusun2000

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值