gcc 4.4.1 及以上版本编译 tslib 报错

/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/soft/tslib/ts_lib/tslib/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/soft/tslib/ts_lib/tslib'

make: *** [all] Error 2

解决办法:将open函数的修改如下:

cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR ,0);


原文地址:https://www.cnblogs.com/leaven/p/1886595.html