error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments

使用open函数的时候,如果在第二个参数中使用了O_CREAT,就必须添加第三个参数:创建文件时赋予的初始权。

建议使用如下参数创建文件: