From 38c66ccb21020ccd650a9a6321059303c284086a Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Mon, 22 Apr 2019 17:22:57 +0300 Subject: [PATCH] weston-launch: Fix warning on error() not being avaiable due to removal of header Commit a1450a8a7 removed errno header but forgot to remove all error() calls. Signed-off-by: Marius Vlad --- libweston/weston-launch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c index 9e5c9429..0ae7d0df 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -850,8 +850,10 @@ main(int argc, char *argv[]) fds[1].events = POLLIN; n = poll(fds, 2, -1); - if (n < 0) - error(0, errno, "poll failed"); + if (n < 0) { + fprintf(stderr, "poll failed: %s\n", strerror(errno)); + return -1; + } if (fds[0].revents & POLLIN) handle_socket_msg(&wl); if (fds[1].revents)