|
In function 'open',
inlined from 'main' at ts_calibrate.c:230:
/opt/EmbedSky/4.4.6/lib/gcc/arm-embedsky-linux-gnueabi/4.4.6/../../../../arm-embedsky-linux-gnueabi/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:232:
/opt/EmbedSky/4.4.6/lib/gcc/arm-embedsky-linux-gnueabi/4.4.6/../../../../arm-embedsky-linux-gnueabi/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] 错误 1
make[2]:正在离开目录 `/opt/EmbedSky/qt-4.5/tslib-1.4.1/tests'
gcc 新版本编译器对语法检查严格,在源文件 ./tests/ts_calibrate.c 中
// 源文件
// if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
// cal_fd = open (calfile, O_CREAT | O_RDWR);
// } else {
// cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR);
// }
// 需要更改成如下形式
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
cal_fd = open (calfile, O_CREAT | O_RDWR, 0777);
} else {
cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR, 0777);
}
保存后重新编译即可 |
|