From b59b240462fe3a465f44454b01f7608246476bf1 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Tue, 28 Apr 2015 14:39:02 +0100 Subject: [PATCH] Fix build issue, missing mode on an open with O_CREAT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building with gcc 4.9.2, we hit the following build error: In function ‘open’, inlined from ‘sendfile_copy’ at sendfile_grouplock.c:229:9: /usr/include/x86_64-linux-gnu/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 (); ..fix this with a mode of 0644 Signed-off-by: Colin Ian King --- lustre/tests/sendfile_grouplock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/tests/sendfile_grouplock.c b/lustre/tests/sendfile_grouplock.c index 42d66a3..80b2da5 100644 --- a/lustre/tests/sendfile_grouplock.c +++ b/lustre/tests/sendfile_grouplock.c @@ -226,7 +226,7 @@ static int sendfile_copy(const char *source, int source_gid, source_gid, source, strerror(-rc)); } - fd_out = open(dest, O_WRONLY | O_TRUNC | O_CREAT); + fd_out = open(dest, O_WRONLY | O_TRUNC | O_CREAT, 0644); ASSERTF(fd_out >= 0, "creation failed for '%s': %s", dest, strerror(errno)); -- 2.1.4