aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch
blob: 38e78aa22591d568665aa7a89a1f620ba46f2cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 7857e5aa2459b2746e062ae59ae0240c4af7af5d Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Mon, 29 Oct 2018 21:40:32 +0000
Subject: [PATCH] g2d-renderer: Fix open function build break

|                  from ../git/libweston/g2d-renderer.c:40:
| In function 'open',
|     inlined from 'g2d_renderer_create' at ../git/libweston/g2d-renderer.c:1629:2:
| /home/r60874/upstream/fsl-xwayland/tmp/work/cortexa9t2hf-neon-mx6qdl-fsl-linux-gnueabi/weston/4.0.0.imx-r0/recipe-                                                                        sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open wit                                                                        h O_CREAT or O_TMPFILE in second argument needs 3 arguments
|     __open_missing_mode ();
|     ^~~~~~~~~~~~~~~~~~~~~~
| Makefile:5266: recipe for target 'libweston/g2d_renderer_la-g2d-renderer.lo' failed

Upstream-Status: Inappropriate [i.MX-specific]

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 libweston/g2d-renderer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libweston/g2d-renderer.c b/libweston/g2d-renderer.c
index cc82711..0675350 100644
--- a/libweston/g2d-renderer.c
+++ b/libweston/g2d-renderer.c
@@ -1626,7 +1626,7 @@ g2d_renderer_create(struct weston_compositor *ec)
 	path = malloc(strlen(dir) + 40);
 	strcpy(path, dir);
 	strcat(path, "/use-g2d-renderer");
-	close(open(path, O_CREAT | O_RDWR));
+	close(open(path, O_CREAT | O_RDWR, 0600));
 	free(path);
 
 	return 0;
@@ -1804,7 +1804,7 @@ fb_frame_buffer_open(struct g2d_output_state *output, const char *fb_dev,
                         struct fb_screeninfo *screen_info)
 {
 	/* Open the frame buffer device. */
-	screen_info->fb_fd = open(fb_dev, O_RDWR | O_CLOEXEC);
+	screen_info->fb_fd = open(fb_dev, O_RDWR | O_CLOEXEC, 0600);
 	if (screen_info->fb_fd < 0) {
 		weston_log("Failed to open frame buffer device%s \n", fb_dev);
 		return -1;
-- 
2.7.4