public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] lib/audio: Fix compiler error with missing permsisions to O_CREAT.
Date: Mon, 29 Apr 2019 11:24:37 +0200	[thread overview]
Message-ID: <20190429092437.23489-1-maarten.lankhorst@linux.intel.com> (raw)

In file included from /usr/include/fcntl.h:290:0,
                 from ../../lib/igt_audio.c:30:
In function ‘open’,
    inlined from ‘audio_create_wav_file_s32_le’ at igt_audio.c:450:5:
/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 or O_TMPFILE in second argument needs 3 arguments
    __open_missing_mode ();
    ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Simon Ser <simon.ser@intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
---
 lib/igt_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_audio.c b/lib/igt_audio.c
index 5b0860e6cc76..fd8cf07c0de3 100644
--- a/lib/igt_audio.c
+++ b/lib/igt_audio.c
@@ -447,7 +447,7 @@ int audio_create_wav_file_s32_le(const char *qualifier, uint32_t sample_rate,
 		*path = strdup(_path);
 
 	igt_debug("Dumping %s audio to %s\n", qualifier, _path);
-	fd = open(_path, O_WRONLY | O_CREAT | O_TRUNC);
+	fd = open(_path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
 	if (fd < 0) {
 		igt_warn("open failed: %s\n", strerror(errno));
 		return -1;
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-04-29  9:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  9:24 Maarten Lankhorst [this message]
2019-04-29  9:50 ` [igt-dev] [PATCH i-g-t] lib/audio: Fix compiler error with missing permsisions to O_CREAT Ser, Simon
2019-04-29 10:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-29 12:18 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190429092437.23489-1-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox