From 20b05ae1dc65b05f0aed2f12937560acf3294972 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 6 Feb 2018 14:55:04 +0100 Subject: testing/weston: Added weston-launch --- .../weston-launch-custom-error-function.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 testing/weston/weston-launch-custom-error-function.patch (limited to 'testing/weston/weston-launch-custom-error-function.patch') diff --git a/testing/weston/weston-launch-custom-error-function.patch b/testing/weston/weston-launch-custom-error-function.patch new file mode 100644 index 0000000000..cd42950e71 --- /dev/null +++ b/testing/weston/weston-launch-custom-error-function.patch @@ -0,0 +1,48 @@ +https://patchwork.freedesktop.org/patch/112884/ + +error.h is a gnu extension and not available in other +popular libcs like musl. This patch provides a replacement. + +Signed-off-by: Murray Calavera +--- + libweston/weston-launch.c | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index 140fde1..84f7d60 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c +@@ -33,7 +33,6 @@ + #include + #include + +-#include + #include + + #include +@@ -112,6 +111,25 @@ struct weston_launch { + + union cmsg_data { unsigned char b[4]; int fd; }; + ++static void ++error(int status, int errnum, const char *msg, ...) ++{ ++ va_list args; ++ ++ fputs("weston-launch: ", stderr); ++ va_start(args, msg); ++ vfprintf(stderr, msg, args); ++ va_end(args); ++ ++ if (errnum) ++ fprintf(stderr, ": %s\n", strerror(errnum)); ++ else ++ fputc('\n', stderr); ++ ++ if (status) ++ exit(status); ++} ++ + static gid_t * + read_groups(void) + { -- cgit v1.2.3