summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-graphical/recipes-graphics
diff options
context:
space:
mode:
authorZhou Mingying <zhoumy@cn.fujitsu.com>2019-08-30 14:14:36 +0800
committerScott Murray <scott.murray@konsulko.com>2019-09-03 13:40:26 +0000
commitffe3d5fdfb02f4b4ae2de7044a9d73ef0321f048 (patch)
tree3d680d2ba8798be21afa76f0acc9fb900ab7f9f7 /meta-agl-profile-graphical/recipes-graphics
parent0fef47773d2eb4970e51df3cae0b07bf0d60536b (diff)
wayland bug backport: Fix fake "Address already in use" error
Backport a bug modification to the wayland used by AGL, because the bug may effect the applications start error The bug modification detail is as bellow: In the current workflow, socket file will be deleted if it already exists. However, if the socket file is a symbolic link or the file that it refers to not exist, we will got "Address already in use", because bind() thinks the socket file exists and won't create it. Now, use lstat() to determine whether the socket file exists. Bug-AGL: SPEC-2783 Signed-off-by: Zhou Mingying <zhoumy@cn.fujitsu.com> Change-Id: Iff2c7abefa56104eef49ae7102ee8a1de796b813
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics')
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch35
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend1
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch
new file mode 100644
index 000000000..ea9dbd65d
--- /dev/null
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch
@@ -0,0 +1,35 @@
+From 152c9ed968124c253f0be25b76c2a083a21af37e Mon Sep 17 00:00:00 2001
+From: Liu Wenlong <liuwl.fnst@cn.fujitsu.com>
+Date: Mon, 26 Aug 2019 17:08:22 +0800
+Subject: [PATCH] server: Fix fake "Address already in use" error
+
+In the current workflow, socket file will be deleted if it already exists.
+However, if the socket file is a symbolic link and the file that it refers
+to doesn't exist, we will got "Address already in use" because bind()
+thinks the socket file exists and won't create it.
+
+Now, use lstat() to determine whether the socket file exists.
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/35]
+
+Signed-off-by: Liu Wenlong <liuwl.fnst@cn.fujitsu.com>
+---
+ src/wayland-server.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wayland-server.c b/src/wayland-server.c
+index 83b984f..3bc6ed7 100644
+--- a/src/wayland-server.c
++++ b/src/wayland-server.c
+@@ -1393,7 +1393,7 @@ wl_socket_lock(struct wl_socket *socket)
+ goto err_fd;
+ }
+
+- if (stat(socket->addr.sun_path, &socket_stat) < 0 ) {
++ if (lstat(socket->addr.sun_path, &socket_stat) < 0 ) {
+ if (errno != ENOENT) {
+ wl_log("did not manage to stat file %s\n",
+ socket->addr.sun_path);
+--
+2.7.4
+
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend
index 9d1822697..5677ed52d 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend
@@ -2,4 +2,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = "\
file://0001-Change-socket-mode-add-rw-for-group.patch \
+ file://0002-server-Fix-fake-Address-already-in-use-error.patch \
"