Skip to content

Commit

Permalink
CA-406953: fix(open): must supply mode with O_CREAT
Browse files Browse the repository at this point in the history
Fixes:
```
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:11: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
```

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Feb 21, 2025
1 parent 17e7f40 commit 5bcf80f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/weightio.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
MTC_STATUS
open_hostweight_file(int *fd, int *err_no)
{
if ((*fd = open(HA_HOST_WEIGHT_FILE, O_RDWR|O_CREAT)) < 0)
if ((*fd = open(HA_HOST_WEIGHT_FILE, O_RDWR|O_CREAT, 00400)) < 0)
{
*err_no = errno;
return MTC_ERROR_WEIGHT_OPEN;
Expand Down

0 comments on commit 5bcf80f

Please sign in to comment.