summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile2
-rw-r--r--src/c_mpdview.c6
2 files changed, 7 insertions, 1 deletions
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 <mpd/client.h>
#include <mpd/connection.h>
+#include <mpd/error.h>
+
+#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;