summaryrefslogtreecommitdiff
path: root/recipes-graphics/wayland/weston/0001-make-error-portable.patch
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2019-05-06 20:56:53 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2019-05-13 18:46:55 +0200
commitdc4a695bba8f4becb8b821515e16079453ccd135 (patch)
treec64278d026e456e07cca2bafdd483002fcd88032 /recipes-graphics/wayland/weston/0001-make-error-portable.patch
parent9585ec4176db9d8fc226b7121af4d056f486e391 (diff)
imx: update to 4.14.78_1.0.0_ga bsp
Update the components which NXP forked or provides to the version used in the 4.14.78_1.0.0_ga BSP. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-graphics/wayland/weston/0001-make-error-portable.patch')
-rw-r--r--recipes-graphics/wayland/weston/0001-make-error-portable.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/recipes-graphics/wayland/weston/0001-make-error-portable.patch
new file mode 100644
index 0000000..dc6fbaa
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -0,0 +1,77 @@
+From 6ef33e86557c59b31c9b731c0360ec1d404cc801 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.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted
+
+---
+ 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 9d98e84..8f6b80d 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 bf73e0d..9064439 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
+