]> code.ossystems Code Review - meta-freescale.git/commitdiff
weston: Fix open function build break in g2d-renderer
authorTom Hochstein <tom.hochstein@nxp.com>
Mon, 29 Oct 2018 22:10:49 +0000 (17:10 -0500)
committerTom Hochstein <tom.hochstein@nxp.com>
Tue, 30 Oct 2018 20:20:40 +0000 (15:20 -0500)
|                  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

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch [new file with mode: 0644]
recipes-graphics/wayland/weston_4.0.0.imx.bb

diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch
new file mode 100644 (file)
index 0000000..38e78aa
--- /dev/null
@@ -0,0 +1,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
+
index 40f8cc6159f0de76751d9403c93fce2ea0b37163..47104633f63952a6a2be36e100a6431e8caf7cfb 100644 (file)
@@ -15,6 +15,7 @@ SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=http
            file://0001-make-error-portable.patch \
            file://xwayland.weston-start \
            file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+           file://0001-g2d-renderer-Fix-open-function-build-break.patch \
 "
 SRCREV = "866072b52751e5023651dd9322baa513e1f74fe6"
 S = "${WORKDIR}/git"