summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2019-05-21 13:22:11 +0200
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2019-05-29 14:48:50 +0200
commita13476b9df4b7ac92a6e29e42025e7184ce035f6 (patch)
tree6bf5ddff6302a936a52bf6a9ebbeec8f11c8bd4c /meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch
parent8001f0ebbec73f4b364d4b99aa42646948b5c40f (diff)
Add weston 6.0.0 for WM and HS rewrite
As requested for the WM and HS rewrite. Tested on m3, minnow, qemux86-64, rpi3. (cherry picked from commit fda5568cf4bc268088c9d1f925007d682bb7ef5d) Multiple commits to applied at once. Bug-AGL: SPEC-2444 Change-Id: I3f74b40213d4c4a65400a53fe9c57f52fe3b6096 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch')
-rw-r--r--meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch
new file mode 100644
index 000000000..09ec1559e
--- /dev/null
+++ b/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -0,0 +1,78 @@
+From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 May 2015 20:56:00 -0700
+Subject: [PATCH] make error() portable
+
+error() is not posix but gnu extension so may not be available on all
+kind of systemsi e.g. musl.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ configure.ac | 2 ++
+ libweston/weston-error.h | 20 ++++++++++++++++++++
+ libweston/weston-launch.c | 2 +-
+ 3 files changed, 23 insertions(+), 1 deletion(-)
+ create mode 100644 libweston/weston-error.h
+
+diff --git a/configure.ac b/configure.ac
+index 7aebbdb..dc9c802 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+ [[#include <time.h>]])
+ AC_CHECK_HEADERS([execinfo.h])
+
++AC_CHECK_HEADERS([error.h])
++
+ AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
+
+ # check for libdrm as a build-time dependency only
+diff --git a/libweston/weston-error.h b/libweston/weston-error.h
+new file mode 100644
+index 0000000..2089d02
+--- /dev/null
++++ b/libweston/weston-error.h
+@@ -0,0 +1,20 @@
++#ifndef _WESTON_ERROR_H
++#define _WESTON_ERROR_H
++
++#if defined(HAVE_ERROR_H)
++#include <error.h>
++#else
++#include <err.h>
++#include <string.h>
++#define _weston_error(S, E, F, ...) do { \
++ if (E) \
++ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
++ else \
++ err(S, F, ##__VA_ARGS__); \
++} while(0)
++
++#define error _weston_error
++#endif
++
++#endif
++
+diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
+index 1adcf21..166bf3b 100644
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
+@@ -33,7 +33,6 @@
+ #include <poll.h>
+ #include <errno.h>
+
+-#include <error.h>
+ #include <getopt.h>
+
+ #include <sys/types.h>
+@@ -59,6 +58,7 @@
+ #endif
+
+ #include "weston-launch.h"
++#include "weston-error.h"
+
+ #define DRM_MAJOR 226
+