Fix compile error.

call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments

Reason (man 2 open):

     [mode] argument must be supplied when O_CREAT is specified in flags.

Solution: Create file with rw-rw-r-- mode.

git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@2596 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
a.visegradi 2013-05-27 11:13:52 +00:00 committed by Adam Visegradi
parent 3bda0723fc
commit 59b4837ea7
1 changed files with 1 additions and 1 deletions

View File

@ -451,7 +451,7 @@ static int copy_file(const char *src, const char *dst)
g_free(buf);
return -1;
}
dfd = open(dst, O_WRONLY | O_CREAT | O_TRUNC);
dfd = open(dst, O_WRONLY | O_CREAT | O_TRUNC, 00664);
if (dfd == -1)
{
DC_log(LOG_ERR, "Failed to create %s: %s", dst, strerror(errno));