babeltrace/babeltrace-__openat_missing_mode.patch
Keith Seitz e68e952d97
Workaround __openat_missing_mode compiler error.
(Keith Seitz, RH BZ 1890813)

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2020-10-27 09:12:44 -04:00

22 lines
668 B
Diff

--- babeltrace-1.5.8/formats/ctf/ctf.c.orig 2020-10-23 11:45:34.351789250 -0700
+++ babeltrace-1.5.8/formats/ctf/ctf.c 2020-10-23 12:16:24.236460342 -0700
@@ -2191,7 +2191,7 @@
struct stat statbuf;
char *index_name;
- fd = openat(td->dirfd, path, flags);
+ fd = openat(td->dirfd, path, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (fd < 0) {
perror("File stream openat()");
ret = fd;
@@ -2265,7 +2265,8 @@
goto error_index;
}
} else {
- ret = openat(td->dirfd, index_name, flags);
+ ret = openat(td->dirfd, index_name, flags,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (ret < 0) {
perror("Index file openat()");
ret = -1;