gcc:call to '__open_missing_mode' declared with attribute error

Because when using the open function, if O_CREAT is used in the second parameter, the third parameter must be added: the initial permission given when the file was created. This depends on the version of gcc, and some versions will not report this error.

Solution:

Find the location where the open error is reported in the source code and change it to:

open (redir, O_WRONLY | O_TRUNC | O_CREAT, 0777);

The problem is solved, that is, the parameter "0777" is added.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324852632&siteId=291194637