From 670a6d3bdf7a3e4b38b449fb54fd24a0acc6d935 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 27 Jun 2022 22:52:27 +0200 Subject: Ok --- Makefile | 2 +- src/c_mpdview.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f4dea37..03337fe 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ CFLAGS += -isystem/usr/local/include # CFLAGS += -march=native -O2 -pipe LDFLAGS := -L/usr/local/lib -LDFLAGS += -lmpd +LDFLAGS += -lmpdclient RM := rm -f MKDIR := mkdir -p diff --git a/src/c_mpdview.c b/src/c_mpdview.c index 0fa059c..40166d4 100644 --- a/src/c_mpdview.c +++ b/src/c_mpdview.c @@ -51,6 +51,9 @@ #include #include +#include + +#include "c_mpdview.h" int main @@ -64,6 +67,9 @@ main if (conn == NULL) { return (EXIT_FAILURE); } + if (mpd_connection_get_error(conn) != MPD_ERROR_SUCCESS) { + dprintf(STDERR_FILENO, "%s: %s\n", PROGNAME, mpd_connection_get_error_message(conn)); + } (void)conn; (void)argc; (void)argv; -- cgit v1.2.3