From 59b4837ea79ee03dfd49ad8b3f0414803f81ab06 Mon Sep 17 00:00:00 2001 From: "a.visegradi" Date: Mon, 27 May 2013 11:13:52 +0000 Subject: [PATCH] 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 --- dcapi/local/local_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dcapi/local/local_master.c b/dcapi/local/local_master.c index 447798ee6e..bb3a234b89 100644 --- a/dcapi/local/local_master.c +++ b/dcapi/local/local_master.c @@ -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));