summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-08-06 13:11:36 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-08-06 13:11:36 +0000
commit512712e2654f8840fd1bcb68ffbed1ea9fc375c5 (patch)
treed991986630845e03d389666e56ef16ddfb4cefe4
parent781a84da5cf398d251592320e4b78b144c7368f6 (diff)
Supply mandatory mode argument to open().
-rw-r--r--source/files.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/files.c b/source/files.c
index 3af6d1d..5ceca91 100644
--- a/source/files.c
+++ b/source/files.c
@@ -591,7 +591,8 @@ static inline FILE *fopen_hack( const char *path, const char *mode ) {
}
return _fdopen( fd, "wb" );
#else
- int fd = open( path, O_WRONLY | O_CREAT | O_EXCL );
+ int fd = open( path, O_WRONLY | O_CREAT | O_EXCL,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH );
if( fd == -1 ) {
return NULL;
}