compile tslib1.4,----error: call to ‘__open_missing_mode’ declared with attribute error

在尝试编译tslib时遇到一个错误:'__open_missing_mode' 被声明为带有错误属性。解决方案是检查代码中使用open函数的地方,特别是当使用O_CREAT标志时,必须提供第三个参数0777以符合GCC的严格语法检查。通过修改lines 227和229,添加这个参数可以解决问题。
摘要由CSDN通过智能技术生成
problem:
---------------------
ts_calibrate.c: In function ‘main’:
ts_calibrate.c:234: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
In file included from /usr/include/fcntl.h:205,
                 from /usr/include/sys/fcntl.h:1,
                 from ts_calibrate.c:20:
In function ‘open’,
    inlined from ‘main’ at ts_calibrate.c:227:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
In function ‘open’,
    inlined from ‘main’ at ts_calibrate.c:229:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[2]: *** [ts_calibrate.o] Error 1
make[2]: Leaving directory `/root/Qt_Tools/tslib/tests'
make[1]: *** [all-recurs
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值