Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open with O_CREAT in second argument needs 3 arguments #204

Closed
gdamjan opened this issue Jun 2, 2015 · 3 comments
Closed

open with O_CREAT in second argument needs 3 arguments #204

gdamjan opened this issue Jun 2, 2015 · 3 comments

Comments

@gdamjan
Copy link

gdamjan commented Jun 2, 2015

Compiling on Arch with gcc-5.1 and glibc 2.21 I get this error:

In file included from /usr/include/fcntl.h:302:0,
             from /usr/include/fuse/fuse.h:28,
             from stats.c:23:
In function ‘open’,
    inlined from ‘dump_stats’ at stats.c:145:12: 
/usr/include/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
    __open_missing_mode ();

The fix is to add a mode to the open call in stats.c on line 145

-        fd = open(stat_path, O_CREAT | O_WRONLY | O_TRUNC);
+        fd = open(stat_path, O_CREAT | O_WRONLY | O_TRUNC, 0600);
@jerryblakley
Copy link
Contributor

Thanks for the note. This fix will go in with the next update in the next few days.

@jerryblakley
Copy link
Contributor

This fix is now in on the master and production branches.
Thanks for the tip.

@jerryblakley
Copy link
Contributor

This fix is now on the master and production branches.
Thanks for the tip.

On Tue, Jun 2, 2015 at 1:43 AM, Дамјан Георгиевски <notifications@github.com

wrote:

Compiling on Arch with gcc-5.1 and glibc 2.21 I get this error:

In file included from /usr/include/fcntl.h:302:0,
from /usr/include/fuse/fuse.h:28,
from stats.c:23:
In function ‘open’,
inlined from ‘dump_stats’ at stats.c:145:12:
/usr/include/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
__open_missing_mode ();

The fix is to add a mode to the open call in stats.c on line 145

  •    fd = open(stat_path, O_CREAT | O_WRONLY | O_TRUNC);
    
  •    fd = open(stat_path, O_CREAT | O_WRONLY | O_TRUNC, 0600);
    


Reply to this email directly or view it on GitHub
#204.

Jerry Blakley
Senior Systems Engineer | Pantheon
jerry@pantheon.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants