summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch')
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch80
1 files changed, 0 insertions, 80 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
deleted file mode 100644
index acea9dbc31..0000000000
--- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ /dev/null
@@ -1,80 +0,0 @@
1From c4677e155736062e75687f1a655732c8902e912b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 May 2015 20:56:00 -0700
4Subject: [PATCH] make error() portable
5
6error() is not posix but gnu extension so may not be available on all
7kind of systemsi e.g. musl.
8
9Upstream-Status: Submitted
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Signed-off-by: Ming Liu <ming.liu@toradex.com>
13---
14 libweston/weston-error.h | 20 ++++++++++++++++++++
15 libweston/weston-launch.c | 2 +-
16 meson.build | 1 +
17 3 files changed, 22 insertions(+), 1 deletion(-)
18 create mode 100644 libweston/weston-error.h
19
20diff --git a/libweston/weston-error.h b/libweston/weston-error.h
21new file mode 100644
22index 0000000..2089d02
23--- /dev/null
24+++ b/libweston/weston-error.h
25@@ -0,0 +1,20 @@
26+#ifndef _WESTON_ERROR_H
27+#define _WESTON_ERROR_H
28+
29+#if defined(HAVE_ERROR_H)
30+#include <error.h>
31+#else
32+#include <err.h>
33+#include <string.h>
34+#define _weston_error(S, E, F, ...) do { \
35+ if (E) \
36+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
37+ else \
38+ err(S, F, ##__VA_ARGS__); \
39+} while(0)
40+
41+#define error _weston_error
42+#endif
43+
44+#endif
45+
46diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
47index bf73e0d..9064439 100644
48--- a/libweston/weston-launch.c
49+++ b/libweston/weston-launch.c
50@@ -33,7 +33,6 @@
51 #include <poll.h>
52 #include <errno.h>
53
54-#include <error.h>
55 #include <getopt.h>
56
57 #include <sys/types.h>
58@@ -59,6 +58,7 @@
59 #endif
60
61 #include "weston-launch.h"
62+#include "weston-error.h"
63
64 #define DRM_MAJOR 226
65
66diff --git a/meson.build b/meson.build
67index 2155b7b..baa52d9 100644
68--- a/meson.build
69+++ b/meson.build
70@@ -94,6 +94,7 @@ foreach func : optional_libc_funcs
71 endforeach
72
73 optional_system_headers = [
74+ 'error.h',
75 'linux/sync_file.h'
76 ]
77 foreach hdr : optional_system_headers
78--
792.7.4
80